summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 415de53)
raw | patch | inline | side by side (parent: 415de53)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 20 May 2006 19:07:44 +0000 (21:07 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Sat, 20 May 2006 19:07:44 +0000 (21:07 +0200) |
tig.c | patch | blob | history |
index 3c267aff669f9a1fad1d45ecbe0169d893d3f0c9..be165b9598f5be6f5c20249a154d4393987e6087 100644 (file)
--- a/tig.c
+++ b/tig.c
pclose(pipe);
- if (refs_size == 0)
- die("Not a git repository");
-
return OK;
}
if (load_refs() == ERR)
die("Failed to load refs.");
+ /* Require a git repository unless when running in pager mode. */
+ if (refs_size == 0 && opt_request != REQ_VIEW_PAGER)
+ die("Not a git repository");
+
for (i = 0; i < ARRAY_SIZE(views) && (view = &views[i]); i++)
view->cmd_env = getenv(view->cmd_env);