From: Junio C Hamano Date: Wed, 24 Mar 2010 23:25:39 +0000 (-0700) Subject: Merge branch 'pb/log-first-parent-p-m' X-Git-Tag: v1.7.1-rc0~45 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=797d44343c831680aeae3392259fcadeb178bf61;p=git.git Merge branch 'pb/log-first-parent-p-m' * pb/log-first-parent-p-m: show --first-parent/-m: do not default to --cc show -c: show patch text revision: introduce setup_revision_opt t4013: add tests for log -p -m --first-parent git log -p -m: document -m and honor --first-parent --- 797d44343c831680aeae3392259fcadeb178bf61 diff --cc revision.c index 490b48408,2ddbb5086..0471cd3f7 --- a/revision.c +++ b/revision.c @@@ -1332,9 -1328,9 +1332,9 @@@ static void append_prune_data(const cha * Returns the number of arguments left that weren't recognized * (which are also moved to the head of the argument list) */ - int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def) + int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct setup_revision_opt *opt) { - int i, flags, left, seen_dashdash, read_from_stdin; + int i, flags, left, seen_dashdash, read_from_stdin, got_rev_arg = 0; const char **prune_data = NULL; /* First, search for "--" */ @@@ -1468,10 -1462,12 +1468,12 @@@ revs->prune_data = get_pathspec(revs->prefix, prune_data); if (revs->def == NULL) - revs->def = def; + revs->def = opt ? opt->def : NULL; + if (opt && opt->tweak) + opt->tweak(revs, opt); if (revs->show_merge) prepare_show_merge(revs); - if (revs->def && !revs->pending.nr) { + if (revs->def && !revs->pending.nr && !got_rev_arg) { unsigned char sha1[20]; struct object *object; unsigned mode;