git p4: temp branch name should use / even on windows
Commit fed2369 (git-p4: Search for parent commit on branch creation, 2012-01-25) uses temporary branches to help find the parent of a new p4 branch. The temp branches are of the form "git-p4-tmp/%d" for some p4 change number. Mistakenly, this string was made using os.path.join() instead of just string concatenation. On windows, this turns into a backslash (\), which is not allowed in git branch names. Reported-by: Casey McGinty <casey.mcginty@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pete Wyckoff committed
Jan 26, 2013 at 22:11 UTC
4f9273d27b399c9b6e0be372e607b9a8176c0699
1 file changed
+1
-1
git-p4.py
+1
-1
@@ -2687,7 +2687,7 @@ class P4Sync(Command, P4UserMap):
2687
2688
blob = None
2689
if len(parent) > 0:
2690
- tempBranch = os.path.join(self.tempBranchLocation, "%d" % (change))
2690
+ tempBranch = "%s/%d" % (self.tempBranchLocation, change)
2691
if self.verbose:
2692
print "Creating temporary branch: " + tempBranch
2693
self.commit(description, filesForCommit, tempBranch)