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

[PATCH] notes: allow --dry-run for -n and --verbose for -v

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Aug 6, 2010, 20:28 UTC
Message-ID
<4C5C7059.10203@lsrfire.ath.cx>

For consistency with other git commands, let the prune subcommand of git notes accept the long options --dry-run and --verbose for the respective short ones -n and -v.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 Documentation/git-notes.txt |    2 ++
 builtin/notes.c             |    5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 5540af5..2981d8c 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -129,10 +129,12 @@ OPTIONS
 	is taken to be in `refs/notes/` if it is not qualified.
 
 -n::
+--dry-run::
 	Do not remove anything; just report the object names whose notes
 	would be removed.
 
 -v::
+--verbose::
 	Report all object names whose notes are removed.
 
 
diff --git a/builtin/notes.c b/builtin/notes.c
index 190005f..fbc347c 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -798,8 +798,9 @@ static int prune(int argc, const char **argv, const char *prefix)
 	struct notes_tree *t;
 	int show_only = 0, verbose = 0;
 	struct option options[] = {
-		OPT_BOOLEAN('n', NULL, &show_only, "do not remove, show only"),
-		OPT_BOOLEAN('v', NULL, &verbose, "report pruned notes"),
+		OPT_BOOLEAN('n', "dry-run", &show_only,
+			    "do not remove, show only"),
+		OPT_BOOLEAN('v', "verbose", &verbose, "report pruned notes"),
 		OPT_END()
 	};
 
-- 
1.7.2
Message 1 of 1 in “notes: allow --dry-run for -n and --verbose for -v”
  1. notes: allow --dry-run for -n and --verbose for -vRené Scharfe, Aug 6, 2010

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.