author | Santi Béjar <santi@agolina.net> | |
Mon, 6 Dec 2010 10:20:11 +0000 (11:20 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 7 Dec 2010 00:57:48 +0000 (16:57 -0800) | ||
commit | f864f2615b76e5d74518c482ceeef3a2589017fe | |
tree | 75e63ae646daf844f2adf7c6bf8ad611b0a1e554 | tree | snapshot |
parent | 0b0cd0e0a29a139f418991dd769ea4266ffec370 | commit | diff |
parse-remote: handle detached HEAD
get_remote_merge_branch with zero or one arguments returns the
upstream branch. But a detached HEAD does no have an upstream branch,
as it is not tracking anything. Handle this case testing the exit code
of "git symbolic-ref -q HEAD".
Reported-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Santi Béjar <santi@agolina.net>
Tested-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
get_remote_merge_branch with zero or one arguments returns the
upstream branch. But a detached HEAD does no have an upstream branch,
as it is not tracking anything. Handle this case testing the exit code
of "git symbolic-ref -q HEAD".
Reported-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Santi Béjar <santi@agolina.net>
Tested-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-parse-remote.sh | diff | blob | history |