Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging leaves repo in "still merging" state #1232

Open
meowcat opened this issue Aug 30, 2023 · 1 comment
Open

Merging leaves repo in "still merging" state #1232

meowcat opened this issue Aug 30, 2023 · 1 comment

Comments

@meowcat
Copy link

meowcat commented Aug 30, 2023

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.

@meowcat
Copy link
Author

meowcat commented Aug 30, 2023

Oh, it's a duplicate of #1081. The behaviour is fine, but it would be great if this was documented in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant