From 1b4b0bd954a244084627341abc811fbda07d8663 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 17 May 2006 12:31:41 +0200 Subject: [PATCH] Minor documentation fixes; nothing from git-ls-remote means no git repo --- README | 2 +- tig.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README b/README index 128027e..2387c7b 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ Tig is a git repository browser that additionally can act as a pager for output of various git commands. When browsing repositories, it uses the underlying git commands to present the -user with various views, such as summarized commit log and showing the commit +user with various views, such as summarized revision log and showing the commit with the log message, diffstat, and the diff. Using it as a pager, it will display input from stdin and try to colorize it. diff --git a/tig.c b/tig.c index 52dac31..d4c9869 100644 --- a/tig.c +++ b/tig.c @@ -542,7 +542,7 @@ init_colors(void) **/ #define TIG_LS_REMOTE \ - "git ls-remote ." + "git ls-remote . 2>/dev/null" /** * [[view-commands]] @@ -586,7 +586,7 @@ init_colors(void) /* ... silently ignore that the following are also exported. */ #define TIG_HELP_CMD \ - "man tig 2> /dev/null" + "man tig 2>/dev/null" #define TIG_PAGER_CMD \ "" @@ -2021,6 +2021,9 @@ load_refs(void) pclose(pipe); + if (refs_size == 0) + die("Not a git repository"); + return OK; } @@ -2155,7 +2158,7 @@ main(int argc, char *argv[]) * have a file named 'master' it will clash with the reference named * 'master', and thus you will have to use: * - * $ tag log -- master + * $ tig log -- master * * NOTE: For the main view, avoiding ambiguity will in some cases require * you to specify two "\--" options. The first will make tig(1) stop @@ -2170,10 +2173,11 @@ main(int argc, char *argv[]) * If you are only interested in changed that happened between two dates * you can use: * - * $ tig -- --after=may.5th --before=2006-05-16.15:44 + * $ tig -- --after=May.5th --before=2006-05-16.15:44 * * NOTE: The dot (".") is used as a separator instead of a space to avoid - * having to quote the option value. + * having to quote the option value. If you prefer use `--after="May 5th"` + * instead of `--after="May 5th"`. * * Limiting by commit ranges * ~~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.30.2