Avoid double inserts

main
Bob Mottram 2020-05-03 10:14:34 +00:00
parent 4fc5afde9c
commit 7c6b2fd05f
1 changed files with 2 additions and 1 deletions

3
git.py
View File

@ -83,7 +83,8 @@ def gitAddFromHandle(contentStr: str, handle: str) -> str:
for line in patchLines:
contentStr += line + '\n'
if line.startswith('From:'):
contentStr += fromStr + handle + '\n'
if fromStr not in contentStr:
contentStr += fromStr + handle + '\n'
return contentStr