]> git.ipfire.org Git - thirdparty/git.git/commit
fix reflog entries for "git-branch"
authorJunio C Hamano <junkio@cox.net>
Fri, 19 Jan 2007 19:51:29 +0000 (11:51 -0800)
committerJunio C Hamano <junkio@cox.net>
Sat, 3 Feb 2007 20:54:49 +0000 (12:54 -0800)
commit5f856dd47dacb30fb9f605b4b7e1fa577ada7d26
tree634604cc8d2cb12588ea85be851a8581d89c59a2
parent505739f6c0c67b7426ffbc723734c794b0a810d9
fix reflog entries for "git-branch"

Even when -l is not given from the command line, the repository
may have the configuration variable core.logallrefupdates set,
or an old-timer might have done ": >.git/logs/refs/heads/new"
before running "git branch new".  In these cases, the code gave
an uninitialized msg[] from the stack to be written out as the
reflog message.

This also passes a different message when '-f' option is used.
Saying "git branch -f branch some-commit" is a moral equilvalent
of doing "git-reset some-commit" while on the branch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-branch.c