зеркало из https://github.com/microsoft/git.git
diff-merges: make -m/-c/--cc explicitly mutually exclusive
-c/--cc got precedence over -m only because of external logic where corresponding flags are checked before that for -m. This is too error-prone, so add code that explicitly makes these 3 options mutually exclusive, so that the last option specified on the command-line gets precedence. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
3d2b5f2f49
Коммит
255a4dacc5
|
@ -8,6 +8,7 @@ static void suppress(struct rev_info *revs)
|
|||
revs->first_parent_merges = 0;
|
||||
revs->combine_merges = 0;
|
||||
revs->dense_combined_merges = 0;
|
||||
revs->combined_all_paths = 0;
|
||||
}
|
||||
|
||||
static void set_separate(struct rev_info *revs)
|
||||
|
@ -29,12 +30,14 @@ static void set_m(struct rev_info *revs)
|
|||
|
||||
static void set_combined(struct rev_info *revs)
|
||||
{
|
||||
suppress(revs);
|
||||
revs->combine_merges = 1;
|
||||
revs->dense_combined_merges = 0;
|
||||
}
|
||||
|
||||
static void set_dense_combined(struct rev_info *revs)
|
||||
{
|
||||
suppress(revs);
|
||||
revs->combine_merges = 1;
|
||||
revs->dense_combined_merges = 1;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче