summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e955ae9)
raw | patch | inline | side by side (parent: e955ae9)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Wed, 24 Jan 2007 14:05:16 +0000 (15:05 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 24 Jan 2007 23:13:47 +0000 (15:13 -0800) |
A short-hand "-g" for "git log --walk-reflogs" and "git
show-branch --reflog" makes it easier to access the reflog
info.
[jc: added -g to show-branch for symmetry]
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
show-branch --reflog" makes it easier to access the reflog
info.
[jc: added -g to show-branch for symmetry]
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-rev-list.txt | patch | blob | history | |
Documentation/git-show-branch.txt | patch | blob | history | |
builtin-show-branch.c | patch | blob | history | |
revision.c | patch | blob | history |
index a996f6cb1e4e9e94dbf3ccfb383990267a1cb819..c742117595cd8ae5ab371a7ba21513a419af7996 100644 (file)
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.
index 529f3a648a28a6001aa466202f1658091fe219a8..b38633c3973a21860428a02ef3344110f65cec0f 100644 (file)
'git-show-branch' [--all] [--remotes] [--topo-order] [--current]
[--more=<n> | --list | --independent | --merge-base]
[--no-name | --sha1-name] [--topics] [<rev> | <glob>]...
-'git-show-branch' --reflog[=<n>[,<base>]] [--list] <ref>
+'git-show-branch' (-g|--reflog)[=<n>[,<base>]] [--list] <ref>
DESCRIPTION
-----------
--reflog[=<n>[,<base>]] <ref>::
Shows <n> most recent ref-log entries for the given
ref. If <base> is given, <n> entries going back from
- that entry. <base> can be specified as count or date
-
+ that entry. <base> can be specified as count or date.
+ `-g` can be used as a short-hand for this option.
Note that --more, --list, --independent and --merge-base options
are mutually exclusive.
diff --git a/builtin-show-branch.c b/builtin-show-branch.c
index b54c410e1486587786a9454ebc7ceef4bfffc0af..536245e7d3815c087906b56d2af503fa8e4451a9 100644 (file)
--- a/builtin-show-branch.c
+++ b/builtin-show-branch.c
dense = 0;
else if (!strcmp(arg, "--date-order"))
lifo = 0;
- else if (!strcmp(arg, "--reflog")) {
+ else if (!strcmp(arg, "--reflog") || !strcmp(arg, "-g")) {
reflog = DEFAULT_REFLOG;
}
else if (!strncmp(arg, "--reflog=", 9))
parse_reflog_param(arg + 9, &reflog, &reflog_base);
+ else if (!strncmp(arg, "-g=", 3))
+ parse_reflog_param(arg + 3, &reflog, &reflog_base);
else
usage(show_branch_usage);
ac--; av++;
diff --git a/revision.c b/revision.c
index ebd025064c82a3f6190a83e808e8bcf73478dacc..5bcd155e219bfc112ef5e1776f8ea570577c7711 100644 (file)
--- 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;
}