diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2009-10-14 00:11:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-14 01:19:15 -0700 |
commit | d01a8e32fe10f1086e5e427f85237baff218fb01 (patch) | |
tree | 4e5977b6d6487dcaf58add28d06dedbda342c3b7 /t/t9107-git-svn-migrate.sh | |
parent | remote-curl: add missing initialization of argv0_path (diff) | |
download | tgif-d01a8e32fe10f1086e5e427f85237baff218fb01.tar.xz |
clone: Supply the right commit hash to post-checkout when -b is used
When we use -b <branch>, we may checkout something else than what the
remote's HEAD references, but we still used remote_head to supply the
new ref value to the post-checkout hook, which is wrong.
So instead of using remote_head to find the value to be passed to the
post-checkout hook, we have to use our_head_points_at, which is always
correctly setup, even if -b is not used.
This also fixes a segfault when "clone -b <branch>" is used with a
remote repo that doesn't have a valid HEAD, as in such a case
remote_head is NULL, but we still tried to access it.
Reported-by: Devin Cofer <ranguvar@archlinux.us>
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9107-git-svn-migrate.sh')
0 files changed, 0 insertions, 0 deletions