author | Junio C Hamano <junkio@cox.net> | |
Fri, 19 Jan 2007 19:51:29 +0000 (11:51 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 3 Feb 2007 20:54:49 +0000 (12:54 -0800) | ||
commit | 5f856dd47dacb30fb9f605b4b7e1fa577ada7d26 | |
tree | 634604cc8d2cb12588ea85be851a8581d89c59a2 | tree | snapshot |
parent | 505739f6c0c67b7426ffbc723734c794b0a810d9 | commit | diff |
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>
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 | diff | blob | history |