Problem with implement the equiv of git pull
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 1.7k
- Forks
- 408
- Merge médio
- 2d 57min
- PRs com merge (30d)
- 7
Descrição
I am working my way through an implementation of git pull.
It seems that I need to do a Remote.fetch() call followed by a merge.
Problem (1): what is the robust way to generate the fetch_refspecs if the REmote.fetch_refspecs is empty? In other words do you have the APIs that I can duplciaste what push.default=simple causes git pull to do?
Problem (2): I have the objects fetched back I do not know the API to call to merge the remote changed into the local. I tried calling repo.merge() with the ID of the lastest commit from the remote.
But that only lead to modified files in the index. What is the correct API code to make this work?
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece lendo as APIs Remote.fetch, Remote.fetch_refspecs e Repository.merge mencionadas na issue, juntamente com a forma como git pull usa push.default=simple. Determine a sequência de fetch e merge compatível e, em seguida, confirme que as alterações obtidas do repositório remoto são mescladas no repositório local, em vez de apenas deixarem modificações no índice.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- git, python
- Domínio
- devtools
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 25/100