author | Vincent van Ravesteijn <vfr@lyx.org> | |
Wed, 23 Nov 2011 06:31:55 +0000 (07:31 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 23 Nov 2011 21:23:33 +0000 (13:23 -0800) | ||
commit | 5cd75c7d8da8971d0d78f82d78c017e686fb5bb0 | |
tree | bf3335e4fa4b6949ee87754d9b9f2debd1a94a9d | tree | snapshot |
parent | b15aa973b296ca36ae39592491bcb02944ac0f7a | commit | diff |
builtin-branch: Fix crash on invalid use of --force
The option --force should not put us in 'create branch' mode. The
fact that this option is only valid in 'create branch' mode is
already caught by the the next 'if' in which we assure that we
are in the correct mode.
Without this patch, "git branch -f" without any other argument ends
up calling create_branch without any branch name.
Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The option --force should not put us in 'create branch' mode. The
fact that this option is only valid in 'create branch' mode is
already caught by the the next 'if' in which we assure that we
are in the correct mode.
Without this patch, "git branch -f" without any other argument ends
up calling create_branch without any branch name.
Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c | diff | blob | history |