mirror of
https://github.com/frej/fast-export.git
synced 2025-11-08 12:15:39 +01:00
don't write out too many merges
This commit is contained in:
@@ -171,6 +171,8 @@ def commit(details, files, branch, branchPrefix):
|
|||||||
gitStream.write("from %s\n" % initialParent)
|
gitStream.write("from %s\n" % initialParent)
|
||||||
initialParent = ""
|
initialParent = ""
|
||||||
|
|
||||||
|
mergedBranches = set()
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
path = file["path"]
|
path = file["path"]
|
||||||
if not path.startswith(branchPrefix):
|
if not path.startswith(branchPrefix):
|
||||||
@@ -202,8 +204,9 @@ def commit(details, files, branch, branchPrefix):
|
|||||||
relPath = source[len(globalPrefix):]
|
relPath = source[len(globalPrefix):]
|
||||||
|
|
||||||
for branch in knownBranches:
|
for branch in knownBranches:
|
||||||
if relPath.startswith(branch):
|
if relPath.startswith(branch) and branch not in mergedBranches:
|
||||||
gitStream.write("merge refs/heads/%s\n" % branch)
|
gitStream.write("merge refs/heads/%s\n" % branch)
|
||||||
|
mergedBranches.add(branch)
|
||||||
break
|
break
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
|
|||||||
Reference in New Issue
Block a user