Hello,
I noticed that, after renaming the current branch, the corresponding
message in .git/logs/HEAD is empty.
For example, running
$ mkdir test-repo
$ cd test-repo
$ git init
$ echo abc >file.txt
$ git add file.txt
$ git commit -m"Add file.txt"
$ git branch -m master new-master
resulted in the following reflogs:
$ cat .git/logs/refs/heads/new-master
00000... 68730... Kyle Meyer <[email protected]> 1484607020 -0500 commit
(initial): Add file.txt
68730... 68730... Kyle Meyer <[email protected]> 1484607020 -0500 Branch:
renamed refs/heads/master to refs/heads/new-master
$ cat .git/logs/HEAD
00000... 68730... Kyle Meyer <[email protected]> 1484607020 -0500 commit
(initial): Add file.txt
68730... 00000... Kyle Meyer <[email protected]> 1484607020 -0500
I expected the second line of .git/logs/HEAD to mirror the second line
of .git/logs/refs/heads/new-master. Are the empty message and null sha1
in HEAD's entry intentional?
--
Kyle