From: Jonas Fonseca Date: Thu, 3 Apr 2008 23:51:27 +0000 (+0200) Subject: Fix compatibility for git rev-parse without --symbolic-full-name X-Git-Tag: tig-0.11~12 X-Git-Url: https://git.distorted.org.uk/~mdw/tig/commitdiff_plain/3704f96bd94e20eb7e516afdd9e324ea1dcc7f4d Fix compatibility for git rev-parse without --symbolic-full-name Use symbolic-ref instead. --- diff --git a/tig.c b/tig.c index 04c607f..a5d6a5e 100644 --- a/tig.c +++ b/tig.c @@ -5671,8 +5671,8 @@ static int load_repo_info(void) { int result; - FILE *pipe = popen("git rev-parse --git-dir --is-inside-work-tree " - " --show-cdup --symbolic-full-name HEAD 2>/dev/null", "r"); + FILE *pipe = popen("(git rev-parse --git-dir --is-inside-work-tree " + " --show-cdup; git symbolic-ref HEAD) 2>/dev/null", "r"); /* XXX: The line outputted by "--show-cdup" can be empty so * initialize it to something invalid to make it possible to