@matheusbsbs / matheus-bagliano / commits / e9af60c88b
Fork 0

merge-recursive: Use '~' instead of '_' to separate file names from branch 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>

Fredrik Kuivinen committed Nov 12, 2005 at 00:55 UTC e9af60c88bbd152ad04640ddb93dc927fc7a10b6
1 file changed +2 -2
git-merge-recursive.py
+2 -2
@@ -304,13 +304,13 @@ def uniquePath(path, branch):
304 raise
305
306 branch = branch.replace('/', '_')
307 - newPath = path + '_' + branch
307 + newPath = path + '~' + branch
308 suffix = 0
309 while newPath in currentFileSet or \
310 newPath in currentDirectorySet or \
311 fileExists(newPath):
312 suffix += 1
313 - newPath = path + '_' + branch + '_' + str(suffix)
313 + newPath = path + '~' + branch + '_' + str(suffix)
314 currentFileSet.add(newPath)
315 return newPath
316