Git development
 help / color / mirror / Atom feed
* [PATCH] describe: Add unlisted option
@ 2007-07-23  6:24 Yasushi SHOJI
  2007-07-23  7:03 ` Shawn O. Pearce
  0 siblings, 1 reply; 5+ messages in thread
From: Yasushi SHOJI @ 2007-07-23  6:24 UTC (permalink / raw)
  To: git

added unlisted options, --contains, --candidates and --debug, to usage
line.  also, prints some info when --contains and --debug are given.
---
 Documentation/git-describe.txt |    4 +++-
 builtin-describe.c             |    5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index ac23e28..f0bcb61 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -8,7 +8,9 @@ git-describe - Show the most recent tag that is reachable from a commit
 
 SYNOPSIS
 --------
-'git-describe' [--all] [--tags] [--contains] [--abbrev=<n>] <committish>...
+'git-describe' [--all] [--tags] [--contains] [--abbrev=<n>]
+               [--candidates=<n>] [--debug]
+               <committish>...
 
 DESCRIPTION
 -----------
diff --git a/builtin-describe.c b/builtin-describe.c
index 669110c..e94f867 100644
--- a/builtin-describe.c
+++ b/builtin-describe.c
@@ -9,7 +9,7 @@
 #define MAX_TAGS	(FLAG_BITS - 1)
 
 static const char describe_usage[] =
-"git-describe [--all] [--tags] [--abbrev=<n>] <committish>*";
+"git-describe [--all] [--tags] [--contains] [--abbrev=<n>] [--candidates] [--debug] <committish>*";
 
 static int debug;	/* Display lots of verbose info */
 static int all;	/* Default to annotated tags only */
@@ -283,6 +283,9 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
 		args[2] = "--tags";
 		memcpy(args + 3, argv + i, (argc - i) * sizeof(char*));
 		args[3 + argc - i] = NULL;
+		if (debug)
+			fprintf(stderr, "redirecting to \"git name-rev\"; "
+				"no searching strategy will be printed\n");
 		return cmd_name_rev(3 + argc - i, args, prefix);
 	}
 
-- 
1.5.3.rc2.4.g726f9

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-23  8:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23  6:24 [PATCH] describe: Add unlisted option Yasushi SHOJI
2007-07-23  7:03 ` Shawn O. Pearce
2007-07-23  7:41   ` Junio C Hamano
2007-07-23  7:47     ` Shawn O. Pearce
2007-07-23  8:54       ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox