Merging leaves repo in "still merging" state
Aperta
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1.7k
- Fork
- 408
- Merge medio
- 2g 57m
- PR unite (30g)
- 7
Descrizione
After executing a merge as suggested in the docs, a git status suggests that "you are still merging".
Bash:
git init mergable
cd mergable
echo a > a
git add .
git commit -m "initial"
git switch -c mergy
echo b > b
git add b
git commit -m "additional"
git switch master
cd ..
git clone mergable mergable-clone
Python:
import pygit2
r = pygit2.Repository("mergable-clone")
mergy = r.references["refs/remotes/origin/mergy"]
parents = [r.head.target, mergy.target]
r.merge(mergy.target)
r.create_commit(
"HEAD",
pygit2.Signature("aaa", "mergy@merge.ch"),
pygit2.Signature("aaa", "mergy@merge.ch"),
"merge",
r.index.write_tree(),
parents
)
Bash:
cd mergable-clone
git status
Returns:
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Another git commit silences the message.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il problema usando gli snippet Bash e Python, quindi esamina gli entry point r.merge e r.create_commit e il modo in cui aggiornano lo stato del merge. Conferma il comportamento con git status; il lavoro è completato quando lo stesso flusso di commit non segnala più che il repository è ancora in fase di merge.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, python
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100