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

[RFC] revision walker: introduce shortcut -g for --walk-reflogs

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 24, 2007, 14:05 UTC
Message-ID
<Pine.LNX.4.63.0701241505050.22628@wbgn013.biozentrum.uni-wuerzburg.de>

Since reflogs are such a useful thing, I need a short way to tell git-log to show me the history according to the reflogs.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 Documentation/git-rev-list.txt |    2 +-
 revision.c                     |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
index beb0906..4f145ea 100644
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -192,7 +192,7 @@ limiting may be applied.
 	In addition to the '<commit>' listed on the command
 	line, read them from the standard input.
 
---walk-reflogs::
+-g, --walk-reflogs::
 
 	Instead of walking the commit ancestry chain, walk
 	reflog entries from the most recent one to older ones.
diff --git a/revision.c b/revision.c
index 6726f73..42ba310 100644
--- a/revision.c
+++ b/revision.c
@@ -868,7 +868,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 				handle_reflog(revs, flags);
 				continue;
 			}
-			if (!strcmp(arg, "--walk-reflogs")) {
+			if (!strcmp(arg, "-g") ||
+					!strcmp(arg, "--walk-reflogs")) {
 				init_reflog_walk(&revs->reflog_info);
 				continue;
 			}
-- 
1.5.0.rc2.g8b13f-dirty
Next: Junio C Hamano
Message 1 of 2 in “[RFC] revision walker: introduce shortcut -g for --walk-reflogs”
  1. Johannes SchindelinJan 24, 2007
  2. Junio C HamanoJan 24, 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.