diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-25 11:22:00 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-25 11:22:00 -0800 |
commit | 20aa6d88b7494bf922abce7142485223731e5323 (patch) | |
tree | e8747f735faab453e8951ea0e3a62b199ccb3626 | |
parent | Merge branch 'pb/submodule-doc-xref' (diff) | |
parent | git-p4: honor lfs.storage configuration variable (diff) | |
download | tgif-20aa6d88b7494bf922abce7142485223731e5323.tar.xz |
Merge branch 'rb/p4-lfs'
"git p4" used to ignore lfs.storage configuration variable, which
has been corrected.
* rb/p4-lfs:
git-p4: honor lfs.storage configuration variable
-rwxr-xr-x | git-p4.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1257,9 +1257,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. |