summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-09-01 16:31:22 -0700
committerJunio C Hamano <gitster@pobox.com>2015-09-01 16:31:22 -0700
commitbb84dceb045febd5320f6810db1fb00b17348ab1 (patch)
tree662296562e9501c179e24d5814ac239d89990507 /git-p4.py
parent2953140a6593c14d68ef2dbd5efaccb0d59da925 (diff)
parenta0a50d873c575876c6a5c185ac1c64b9a33e2fb3 (diff)
downloadgit-bb84dceb045febd5320f6810db1fb00b17348ab1.tar.gz
Merge branch 'ls/p4-fold-case-client-specs'
On case insensitive systems, "git p4" did not work well with client specs. * ls/p4-fold-case-client-specs: git-p4: honor core.ignorecase when using P4 client specs
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-p4.py b/git-p4.py
index 073f87bbfd..0093fa3d83 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1950,10 +1950,14 @@ class View(object):
if "unmap" in res:
# it will list all of them, but only one not unmap-ped
continue
+ if gitConfigBool("core.ignorecase"):
+ res['depotFile'] = res['depotFile'].lower()
self.client_spec_path_cache[res['depotFile']] = self.convert_client_path(res["clientFile"])
# not found files or unmap files set to ""
for depotFile in fileArgs:
+ if gitConfigBool("core.ignorecase"):
+ depotFile = depotFile.lower()
if depotFile not in self.client_spec_path_cache:
self.client_spec_path_cache[depotFile] = ""
@@ -1962,6 +1966,9 @@ class View(object):
depot file should live. Returns "" if the file should
not be mapped in the client."""
+ if gitConfigBool("core.ignorecase"):
+ depot_path = depot_path.lower()
+
if depot_path in self.client_spec_path_cache:
return self.client_spec_path_cache[depot_path]