From 337d7377fb08b547d5827328765f6c7d64ff3628 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 20 Dec 2006 23:31:36 +0100 Subject: [PATCH] Make tig handle GIT_DIR better The problem was caused by load_refs() calling "git-ls-remote ." completely ignoring GIT_DIR. This is fixed by using git-rev-parse --git-dir to extract the path to the requested git repository. --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tig.c b/tig.c index c622183..ebd7abe 100644 --- a/tig.c +++ b/tig.c @@ -81,7 +81,7 @@ static size_t utf8_length(const char *string, size_t max_width, int *coloffset, #define SCALE_SPLIT_VIEW(height) ((height) * 2 / 3) #define TIG_LS_REMOTE \ - "git ls-remote . 2>/dev/null" + "git ls-remote $(git rev-parse --git-dir) 2>/dev/null" #define TIG_DIFF_CMD \ "git show --root --patch-with-stat --find-copies-harder -B -C %s 2>/dev/null" -- 2.11.0