author | Tay Ray Chuan <rctay89@gmail.com> | |
Mon, 9 Aug 2010 16:52:26 +0000 (00:52 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 9 Aug 2010 19:57:17 +0000 (12:57 -0700) | ||
commit | cc70148385d5a36682d3b67fdaa726590577f257 | |
tree | 68f573fe1939b6b06031624c12dfdbf2553d72cd | tree | snapshot |
parent | 02ac98374eefbe4a46d4b53a8a78057ad8ad39b7 | commit | diff |
builtin/checkout: handle -B from detached HEAD correctly
Ensure that strcmp() isn't called when head is null.
Previously we were getting segfaults when checkout -B was done from a
detached HEAD.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ensure that strcmp() isn't called when head is null.
Previously we were getting segfaults when checkout -B was done from a
detached HEAD.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
branch.c | diff | blob | history | |
t/t2018-checkout-branch.sh | diff | blob | history |