summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-p4.py b/git-p4.py
index 073f87bbfd..b1ad86de7f 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -2213,6 +2213,17 @@ class P4Sync(Command, P4UserMap):
text = regexp.sub(r'$\1$', text)
contents = [ text ]
+ if gitConfig("git-p4.pathEncoding"):
+ relPath = relPath.decode(gitConfig("git-p4.pathEncoding")).encode('utf8', 'replace')
+ elif self.verbose:
+ try:
+ relPath.decode('ascii')
+ except:
+ print (
+ "Path with Non-ASCII characters detected and no path encoding defined. "
+ "Please check the encoding: %s" % relPath
+ )
+
self.gitStream.write("M %s inline %s\n" % (git_mode, relPath))
# total length...