mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
After marking a p4 branch as merged don't ever merge it in git again.
Signed-off-by: Simon Hausmann <simon@lst.de>
This commit is contained in:
parent
dcacf8b447
commit
53b03239aa
@ -171,6 +171,8 @@ def commit(details, files, branch, branchPrefix):
|
||||
gitStream.write("from %s\n" % initialParent)
|
||||
initialParent = ""
|
||||
|
||||
mergedBranches = set()
|
||||
|
||||
for file in files:
|
||||
path = file["path"]
|
||||
if not path.startswith(branchPrefix):
|
||||
@ -202,8 +204,9 @@ def commit(details, files, branch, branchPrefix):
|
||||
relPath = source[len(globalPrefix):]
|
||||
|
||||
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)
|
||||
mergedBranches.add(branch)
|
||||
break
|
||||
|
||||
for file in files:
|
||||
|
Loading…
Reference in New Issue
Block a user