-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Description
In the case that the currently checked-out branch is renamed, Git core has logic to write to HEAD
's reflog instead of only the ref-specific reflog (https://github.com/git/git/blob/e0aaa1b6532cfce93d87af9bc813fb2e7a7ce9d7/refs/files-backend.c#L2156-L2186). libgit2, however, only writes to the ref-specific reflog.
Reproduction steps
- Rename the currently checked-out branch via
git_reference_rename
(for example, check outdevelopment
and rename it todevelop
).
Expected behavior
- The reflog for the new name of the branch should be written to (for example,
.git/logs/refs/heads/develop
should containbranch: renamed...
). - The reflog for
HEAD
should be written to (for example,.git/logs/HEAD
should containbranch: renamed...
.
Actual behavior
- The reflog for the new name of the branch is written to (for example,
.git/logs/refs/heads/develop
should containbranch: renamed...
). - The reflog for
HEAD
is not written to (for example,.git/logs/HEAD
should containbranch: renamed...
.
Version of libgit2 (release number or SHA1)
v0.25.1
Operating system(s) tested
macOS
Metadata
Metadata
Assignees
Labels
No labels