mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
revision: factor out initialization of diff-merge related settings
Move initialization code related to diffing merges into new init_diff_merge_revs() function. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
299a663440
commit
027c4783d7
|
@ -1805,6 +1805,8 @@ static int add_parents_only(struct rev_info *revs, const char *arg_, int flags,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void init_diff_merge_revs(struct rev_info *revs);
|
||||
|
||||
void repo_init_revisions(struct repository *r,
|
||||
struct rev_info *revs,
|
||||
const char *prefix)
|
||||
|
@ -1813,7 +1815,7 @@ void repo_init_revisions(struct repository *r,
|
|||
|
||||
revs->repo = r;
|
||||
revs->abbrev = DEFAULT_ABBREV;
|
||||
revs->ignore_merges = -1;
|
||||
init_diff_merge_revs(revs);
|
||||
revs->simplify_history = 1;
|
||||
revs->pruning.repo = r;
|
||||
revs->pruning.flags.recursive = 1;
|
||||
|
@ -2153,6 +2155,11 @@ static void add_message_grep(struct rev_info *revs, const char *pattern)
|
|||
add_grep(revs, pattern, GREP_PATTERN_BODY);
|
||||
}
|
||||
|
||||
static void init_diff_merge_revs(struct rev_info *revs)
|
||||
{
|
||||
revs->ignore_merges = -1;
|
||||
}
|
||||
|
||||
static int parse_diff_merge_opts(struct rev_info *revs, const char **argv)
|
||||
{
|
||||
int argcount = 1;
|
||||
|
|
Loading…
Reference in a new issue