]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-p4.py
t6020: new test with interleaved lexicographic ordering of directories
[thirdparty/git.git] / git-p4.py
index 9165ada2fd0170430ef7033b4e2617dbb962dd27..40d9e7c594e590bd97069e29096dc34f3e642ed9 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -1272,9 +1272,15 @@ class GitLFS(LargeFileSystem):
             pointerFile = re.sub(r'Git LFS pointer for.*\n\n', '', pointerFile)
 
         oid = re.search(r'^oid \w+:(\w+)', pointerFile, re.MULTILINE).group(1)
+        # if someone use external lfs.storage ( not in local repo git )
+        lfs_path = gitConfig('lfs.storage')
+        if not lfs_path:
+            lfs_path = 'lfs'
+        if not os.path.isabs(lfs_path):
+            lfs_path = os.path.join(os.getcwd(), '.git', lfs_path)
         localLargeFile = os.path.join(
-            os.getcwd(),
-            '.git', 'lfs', 'objects', oid[:2], oid[2:4],
+            lfs_path,
+            'objects', oid[:2], oid[2:4],
             oid,
         )
         # LFS Spec states that pointer files should not have the executable bit set.