aboutsummaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 3250b2d7e1..1c224d2764 100644
--- a/revision.c
+++ b/revision.c
@@ -2209,6 +2209,25 @@ static void setup_diff_merges_revs(struct rev_info *revs)
die("--combined-all-paths makes no sense without -c or --cc");
}
+void rev_diff_merges_first_parent_defaults_to_enable(struct rev_info *revs)
+{
+ if (revs->first_parent_only && revs->ignore_merges < 0)
+ revs->ignore_merges = 0;
+}
+
+void rev_diff_merges_default_to_dense_combined(struct rev_info *revs)
+{
+ if (revs->ignore_merges < 0) {
+ /* There was no "-m" variant on the command line */
+ revs->ignore_merges = 0;
+ if (!revs->first_parent_only && !revs->combine_merges) {
+ /* No "--first-parent", "-c", or "--cc" */
+ revs->combine_merges = 1;
+ revs->dense_combined_merges = 1;
+ }
+ }
+}
+
static int handle_revision_opt(struct rev_info *revs, int argc, const char **argv,
int *unkc, const char **unkv,
const struct setup_revision_opt* opt)