From d44f34bfa910a7b131394d144061e4e43100ccae Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 16 May 2006 01:48:08 +0200 Subject: [PATCH] Further improve documentation --- tig.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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; -- 2.32.0.93.g670b81a890