diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-24 16:25:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-24 16:25:39 -0700 |
commit | 797d44343c831680aeae3392259fcadeb178bf61 (patch) | |
tree | 6639bf5dfb12eea0a67bd3b3323e3cabd79bc58e /revision.c | |
parent | 954f7cfdac48b8d9fe91c29ecfa44ac0c639867c (diff) | |
parent | 2bf6587349e31b582dae47954b1a334052230e28 (diff) | |
download | git-797d44343c831680aeae3392259fcadeb178bf61.tar.gz |
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
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/revision.c b/revision.c index 490b484084..0471cd3f7e 100644 --- a/revision.c +++ b/revision.c @@ -1332,7 +1332,7 @@ static void append_prune_data(const char ***prune_data, const char **av) * 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, got_rev_arg = 0; const char **prune_data = NULL; @@ -1468,7 +1468,9 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch 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 && !got_rev_arg) { @@ -1502,11 +1504,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch if (!revs->full_diff) diff_tree_setup_paths(revs->prune_data, &revs->diffopt); } - if (revs->combine_merges) { + if (revs->combine_merges) revs->ignore_merges = 0; - if (revs->dense_combined_merges && !revs->diffopt.output_format) - revs->diffopt.output_format = DIFF_FORMAT_PATCH; - } revs->diffopt.abbrev = revs->abbrev; if (diff_setup_done(&revs->diffopt) < 0) die("diff_setup_done failed"); |