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

2 messages from 2007-01-24 to 2007-01-24. Participants: Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/6505

## Johannes Schindelin, 2007-01-24 14:05

Subject: [RFC] revision walker: introduce shortcut -g for --walk-reflogs
Message-ID: <Pine.LNX.4.63.0701241505050.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0701241505050.22628%40wbgn013.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

```

## Junio C Hamano, 2007-01-24 23:09

Subject: Re: [RFC] revision walker: introduce shortcut -g for --walk-reflogs
Message-ID: <7vveiwdnu1.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vveiwdnu1.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <Pine.LNX.4.63.0701241505050.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
I think this makes sense (will do the same for the other one).

```
