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

[PATCH] reflog: Usage documentation cleanup

From
Nelson Elhage <nelhage@mit.edu>
Date
Sep 13, 2009, 17:23 UTC
Message-ID
<1252862632-17581-1-git-send-email-nelhage@mit.edu>
* Make git-reflog.txt and the builtin usage text consistent.
* Make 'git reflog expire' not claim that 'show' takes the same
  arguments as 'expire'.
* Document -n as an alias for --dry-run for the expire and delete
  subcommands.
---
 Documentation/git-reflog.txt |    5 +++--
 builtin-reflog.c             |    4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

Thanks to Jeff King and Erik Faye-Lund for both pointing out that 'git reflog expire' is probably wrong to be documenting the 'show' command in the first place, which makes this cleanup much saner.

diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt
index 7f7a544..2c90c2c 100644
--- a/Documentation/git-reflog.txt
+++ b/Documentation/git-reflog.txt
@@ -16,10 +16,11 @@ The command takes various subcommands, and different options
 depending on the subcommand:
 
 [verse]
-'git reflog expire' [--dry-run] [--stale-fix] [--verbose]
+'git reflog expire' [-n | --dry-run] [--stale-fix] [--verbose]
 	[--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...
 +
-'git reflog delete' ref@\{specifier\}...
+'git reflog delete [--verbose] [-n | --dry-run] [--rewrite]
+	[--updateref] ref@\{specifier}\...'
 +
 'git reflog' ['show'] [log-options] [<ref>]
 
diff --git a/builtin-reflog.c b/builtin-reflog.c
index 95198c5..4da5c6b 100644
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
@@ -13,9 +13,9 @@
  */
 
 static const char reflog_expire_usage[] =
-"git reflog (show|expire) [--verbose] [--dry-run] [--stale-fix] [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
+"git reflog expire [--verbose] [-n | --dry-run] [--stale-fix] [--expire=<time>] [--expire-unreachable=<time>] [--all] <refs>...";
 static const char reflog_delete_usage[] =
-"git reflog delete [--verbose] [--dry-run] [--rewrite] [--updateref] <refs>...";
+"git reflog delete [--verbose] [-n | --dry-run] [--rewrite] [--updateref] ref@{specifier}...";
 
 static unsigned long default_reflog_expire;
 static unsigned long default_reflog_expire_unreachable;
-- 
1.6.3.1.499.ge7b8da
Message 1 of 1 in “reflog: Usage documentation cleanup”
  1. reflog: Usage documentation cleanupNelson Elhage, Sep 13, 2009

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.