Skip to content

Commit e9af60c

Browse files
Fredrik KuivinenJunio C Hamano
authored andcommitted
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>
1 parent 857f26d commit e9af60c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-merge-recursive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ def fileExists(path):
304304
raise
305305

306306
branch = branch.replace('/', '_')
307-
newPath = path + '_' + branch
307+
newPath = path + '~' + branch
308308
suffix = 0
309309
while newPath in currentFileSet or \
310310
newPath in currentDirectorySet or \
311311
fileExists(newPath):
312312
suffix += 1
313-
newPath = path + '_' + branch + '_' + str(suffix)
313+
newPath = path + '~' + branch + '_' + str(suffix)
314314
currentFileSet.add(newPath)
315315
return newPath
316316

0 commit comments

Comments
 (0)