From: Jonas Fonseca Date: Mon, 15 May 2006 23:48:08 +0000 (+0200) Subject: Further improve documentation X-Git-Tag: tig-0.3~13 X-Git-Url: https://git.distorted.org.uk/~mdw/tig/commitdiff_plain/d44f34bfa910a7b131394d144061e4e43100ccae Further improve documentation --- diff --git a/tig.c b/tig.c index 3b51c5a..6a94a2a 100644 --- a/tig.c +++ b/tig.c @@ -295,7 +295,7 @@ parse_options(int argc, char *argv[]) /** * \--:: * End of tig(1) options. Useful when specifying commands - * for the main view. Example: + * options for the main view. Example: * * $ tig -- --since=1.month **/ @@ -305,13 +305,13 @@ parse_options(int argc, char *argv[]) } /** - * log [options]:: + * log [git log options]:: * Open log view using the given git log options. * - * diff [options]:: + * diff [git diff options]:: * Open diff view using the given git diff options. * - * show [options]:: + * show [git show options]:: * Open diff view using the given git show options. **/ if (!strcmp(opt, "log") || @@ -322,11 +322,14 @@ parse_options(int argc, char *argv[]) break; } - /* Make stuff like: + /** + * [git options]:: + * tig(1) will stop the option parsing when the first + * command line parameter not starting with "-" is + * encountered. This makes the following work: * * $ tig tag-1.0..HEAD - * - * work. */ + **/ if (opt[0] && opt[0] != '-') break;