Skip to content

Write to the HEAD reflog when renaming the currently active branch - #4297

Closed
jgrosso wants to merge 1 commit into
libgit2:mainfrom
jgrosso:fix/maybe-write-to-head-reflog-during-ref-rename
Closed

jgrosso wants to merge 1 commit into
libgit2:mainfrom
jgrosso:fix/maybe-write-to-head-reflog-during-ref-rename

Conversation

@jgrosso

@jgrosso jgrosso commented Jul 7, 2017

Copy link
Copy Markdown

Resolves #4292.

@tiennou

tiennou commented Jul 7, 2017

Copy link
Copy Markdown
Contributor

Here are the lines added to the HEAD reflog after the test executes.

0: 000000000000000000000000000000000000000 a65fedf39aefe402d3bb6e24df4d4f5fe454775 somesig checkout: moving from master to renamed
1: 000000000000000000000000000000000000000 a65fedf39aefe402d3bb6e24df4d4f5fe454775 somesig (null)

1 is the message I'm passing when renaming, 0 is the result of the git_repository_set_head call.

So "in theory" it works : the message when renaming now appears in the HEAD reflog. But it doesn't match what git does.

Base automatically changed from master to main January 7, 2021 10:09
@ethomson

Copy link
Copy Markdown
Member

Closing as stale — we need to always match what git does

@ethomson ethomson closed this Mar 12, 2024
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

Successfully merging this pull request may close these issues.

Renaming the current branch doesn't cause a message to be written to the HEAD reflog

3 participants