aboutsummaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-02 12:43:05 -0700
committerJunio C Hamano <gitster@pobox.com>2012-07-09 16:42:22 -0700
commitd5f6b1d756a29255efedee3cb6e8526aedcfeb00 (patch)
treeaf73d5cab8e0aa357f9ace153857d95a684bdf64 /builtin/log.c
parent8e676e8ba567eccee1510b90ec2e0364dcc2f3b4 (diff)
downloadgit-d5f6b1d756a29255efedee3cb6e8526aedcfeb00.tar.gz
git-d5f6b1d756a29255efedee3cb6e8526aedcfeb00.tar.xz
revision.c: the "log" family, except for "show", takes committish
Add a field to setup_revision_opt structure and allow these callers to tell the setup_revisions command parsing machinery that short SHA1 it encounters are meant to name committish. This step does not go all the way to connect the setup_revisions() to sha1_name.c yet. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 7d1f6f88a..9363f3929 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -363,6 +363,7 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
rev.simplify_history = 0;
memset(&opt, 0, sizeof(opt));
opt.def = "HEAD";
+ opt.revarg_opt = REVARG_COMMITTISH;
cmd_log_init(argc, argv, prefix, &rev, &opt);
if (!rev.diffopt.output_format)
rev.diffopt.output_format = DIFF_FORMAT_RAW;
@@ -543,6 +544,7 @@ int cmd_log(int argc, const char **argv, const char *prefix)
rev.always_show_header = 1;
memset(&opt, 0, sizeof(opt));
opt.def = "HEAD";
+ opt.revarg_opt = REVARG_COMMITTISH;
cmd_log_init(argc, argv, prefix, &rev, &opt);
return cmd_log_walk(&rev);
}
@@ -1144,6 +1146,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
rev.subject_prefix = fmt_patch_subject_prefix;
memset(&s_r_opt, 0, sizeof(s_r_opt));
s_r_opt.def = "HEAD";
+ s_r_opt.revarg_opt = REVARG_COMMITTISH;
if (default_attach) {
rev.mime_boundary = default_attach;