Skip to content

Commit

Permalink
merge-recursive: Use '~' instead of '_' to separate file names from b…
Browse files Browse the repository at this point in the history
…ranch names

Makes it less probable that we get a clash with an existing file,
furthermore Cogito already uses '~' for this purpose.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Fredrik Kuivinen authored and Junio C Hamano committed Nov 12, 2005
1 parent 857f26d commit e9af60c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-merge-recursive.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,13 @@ def fileExists(path):
raise

branch = branch.replace('/', '_')
newPath = path + '_' + branch
newPath = path + '~' + branch
suffix = 0
while newPath in currentFileSet or \
newPath in currentDirectorySet or \
fileExists(newPath):
suffix += 1
newPath = path + '_' + branch + '_' + str(suffix)
newPath = path + '~' + branch + '_' + str(suffix)
currentFileSet.add(newPath)
return newPath

Expand Down

0 comments on commit e9af60c

Please sign in to comment.