From: panzercheg <panzercheg@xxxxxxxxx> Use the value configured in lfs.storage, if exists, as all the "git" operations do, for consistency. Signed-off-by: r.burenkov <panzercheg@xxxxxxxxx> --- git-p4.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/git-p4.py b/git-p4.py index 60c73b6a37..0b3a07cb31 100755 --- a/git-p4.py +++ b/git-p4.py @@ -1257,9 +1257,15 @@ def generatePointer(self, contentFile): 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. -- gitgitgadget