Skip to content

Commit

Permalink
Merge branch 'rb/p4-lfs' into jch
Browse files Browse the repository at this point in the history
"git p4" used to ignore lfs.storage configuration variable, which
has been corrected.

* rb/p4-lfs:
  git-p4: honor lfs.storage configuration variable
  • Loading branch information
gitster committed Dec 20, 2019
2 parents 7eaaf0e + ea94b16 commit 6dd924c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions git-p4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6dd924c

Please sign in to comment.