summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2019-05-24 09:35:20 +0200
committerFrancois Ferrand <thetypz@gmail.com>2019-05-24 12:06:33 +0000
commitc5b0e23490478b4e5d22335d7015f40a8c187518 (patch)
tree7186d1587a1010c3cbcf78d545a5ba129eb25bec /project.py
parentd92464e8efb880ea234b24b7a053b977152e5d0b (diff)
downloadgit-repo-c5b0e23490478b4e5d22335d7015f40a8c187518.tar.gz
project: Set config option to skip lfs process filterv1.13.3
During sync, repo runs `git read-tree --reset -u -v HEAD` which causes git-lfs's smudge filter to run, which fails because git-lfs does not work with bare repositories. This was fixed in I091ff37998131e2e6bbc59aa37ee352fe12d7fcd to automatically disable this smudge filter. However, later versions of Git (2.11.0) introduced a new filter protocol [1], to avoid spawning a new command for each filtered file. This was implemented in Git-LFS 1.5.0 [2]. This patch fixes the issue by setting the git lfs process filter, in addition to the smudge filter. For any projects that have LFS objects, `git lfs pull` must still be executed manually afterwards. [1] https://github.com/git/git/commit/edcc85814c87ebd7f3b1b7d3979fac3dfb84d308 [2] https://github.com/git-lfs/git-lfs/pull/1617 Bug: https://crbug.com/gerrit/10911 Change-Id: I277fc68fdefc91514a2412b3887e3be9106cab48
Diffstat (limited to 'project.py')
-rwxr-xr-xproject.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/project.py b/project.py
index de35a602..e4558e0a 100755
--- a/project.py
+++ b/project.py
@@ -2399,6 +2399,7 @@ class Project(object):
2399 if m.Has(key, include_defaults=False): 2399 if m.Has(key, include_defaults=False):
2400 self.config.SetString(key, m.GetString(key)) 2400 self.config.SetString(key, m.GetString(key))
2401 self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f') 2401 self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f')
2402 self.config.SetString('filter.lfs.process', 'git-lfs filter-process --skip')
2402 if self.manifest.IsMirror: 2403 if self.manifest.IsMirror:
2403 self.config.SetString('core.bare', 'true') 2404 self.config.SetString('core.bare', 'true')
2404 else: 2405 else: