threads / patch / 2462

patch, 3 partsmerge-recursive: Use '~' instead of '_' to separate file names from branch names

Subject: [PATCH 3/3] merge-recursive: Use '~' instead of '_' to separate file names from branch names

## tl;dr

One message between Nov 11, 2005 and Nov 11, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Fredrik Kuivinen· Nov 11, 2005, 23:55 UTC · lore

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>
---
 git-merge-recursive.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

applies-to: cd30fe9db68f151066eeadd75eb2fdcb7ff89148 188d233dddacf754d1b7e8c7154293f9a4668180

Show changes to git-merge-recursive.py +2 −2
diff --git a/git-merge-recursive.py b/git-merge-recursive.py
index 21f1e92..1bf73f3 100755
--- a/git-merge-recursive.py
+++ b/git-merge-recursive.py
@@ -304,13 +304,13 @@ def uniquePath(path, branch):
                 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
 
---
0.99.9.GIT

← back to recent threads