Exclude some unnecessary merge commits from history

Removing merge commits that do not contribute to the tree during
listing, reduces the number of merge commits to be subsequently pruned.

In future any remaining merges may indicate a problem, or be used to
reduce conflict cases by preserving them should users be utilizing
manual merges to resolve patch conflicts.

Change-Id: I8118db5acace6cb5d3b056c3d2cdaf398026c84c
This commit is contained in:
Darragh Bailey 2016-12-07 15:17:57 +00:00
parent e4190ff279
commit 7220bd7994
2 changed files with 6 additions and 3 deletions

View File

@ -205,14 +205,17 @@ class Searcher(GitMixin):
else:
search_list = [(self.branch, upstream, None)]
rev_spec = "{0}...{1}"
git_args = {'cherry_pick': True, 'left_only': True}
git_args = {'cherry_pick': True,
'left_only': True,
'full_history': True,
}
extra_args.append("^%s" % self.commit)
for start, end, exclude in search_list:
extra = list(extra_args)
if exclude:
extra.append(exclude)
extra.append("--")
extra.extend(["--", "."])
revision_spec = rev_spec.format(start, end)
self.log.info(
"""

View File

@ -50,4 +50,4 @@
head: [master, J]
upstream: [upstream/master, L]
expected-changes: [D1, G1, H, I, J]
expected-changes: [D1, G1, I, J]