git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] describe: Add unlisted option

From
Yasushi SHOJI <yashi@atmark-techno.com>
Date
Jul 23, 2007, 06:24 UTC
Message-ID
<87sl7fmyca.wl@mail2.atmark-techno.com>
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
Next: Shawn O. Pearce
Message 1 of 5 in “describe: Add unlisted option”
  1. describe: Add unlisted optionYasushi SHOJI, Jul 23, 2007
  2. Shawn O. PearceJul 23, 2007
  3. Junio C HamanoJul 23, 2007
  4. Shawn O. PearceJul 23, 2007
  5. Junio C HamanoJul 23, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.