From c5b0e23490478b4e5d22335d7015f40a8c187518 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Fri, 24 May 2019 09:35:20 +0200 Subject: project: Set config option to skip lfs process filter 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 --- project.py | 1 + 1 file changed, 1 insertion(+) (limited to 'project.py') 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): if m.Has(key, include_defaults=False): self.config.SetString(key, m.GetString(key)) self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f') + self.config.SetString('filter.lfs.process', 'git-lfs filter-process --skip') if self.manifest.IsMirror: self.config.SetString('core.bare', 'true') else: -- cgit v1.2.3-54-g00ecf