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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]