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
reflog doesn't include "(merge)" for merge commits #4094
Comments
|
Thanks for the report @rcjsuen ! This seems like a straightforward fix, I'm going to add the "Easy Fix" and "Up for Grabs" tags in case someone wants to submit a pull request! |
This fixes issue libgit2#4094
|
I was looking here at #4094 this week and was coming toward a similar conclusion but above fix is better than mine. I am was happy to learn I was in the right spot and looking to change the same field. I added above fix into v0.25.1 (2fcb870) and all tests passed on Windows 7. I looked at adding a new test and found that reflog is not tested very much, at least in this fashion, for anything besides "commit (initial)" which failed only four times after breaking on purpose, 3 in rebase::merge and 1 in commit::write. What I think I learned about a merge commit from testing point of view is it crosses unit test boundaries since merge puts repo in a merge state and until the commit completes. |
This fixes issue libgit2#4094
|
Shouldn't this issue have been automatically closed by github when #4143 got merged? |
|
I don't know how the automatic matching works, exactly, but I'll close it manually. |
When you use the command line, merge commits will have
commit (merge):recorded in the reflog as a reminder that a merge commit was created. libgit2 doesn't do this though. It only handles the simplecommit:case and the firstcommit (initial):case.Reproduction steps
git reflog.Expected behavior
cf97c9d HEAD@{0}: commit (merge): Merge branch 'other'Actual behavior
d50f21e HEAD@{0}: commit: Merge branch 'other'Version of libgit2 (release number or SHA1)
Looks like the code is still the same on 8d3b39a.
libgit2/src/refs.c
Lines 1148 to 1153 in 8d3b39a
Operating system(s) tested
Windows 10
The text was updated successfully, but these errors were encountered: