Do not load repository references when acting as a pager
authorJonas Fonseca <fonseca@diku.dk>
Thu, 3 Apr 2008 13:24:44 +0000 (15:24 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Thu, 3 Apr 2008 13:24:44 +0000 (15:24 +0200)
It will cause git ls-remote to print an error message.

tig.c

diff --git a/tig.c b/tig.c
index c41f2b2..39cc340 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -5797,7 +5797,7 @@ main(int argc, char *argv[])
                        die("Failed to initialize character set conversion");
        }
 
-       if (load_refs() == ERR)
+       if (*opt_git_dir && load_refs() == ERR)
                die("Failed to load refs.");
 
        for (i = 0; i < ARRAY_SIZE(views) && (view = &views[i]); i++)