From 76a4a9df86e9f969caf1fdd9e6d2f3ec5f18e94f Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 16 Aug 2016 12:11:12 +0900 Subject: [PATCH] project: Set config option to skip lfs smudge filter During sync, repo runs `git read-tree --reset -u -v HEAD` which causes git-lfs's smudge filter to run. However this fails because git-lfs does not work with bare repositories. Add lfs.filter configuration to the project config as suggested in the comments on the upstream git-lfs client issue [1]. This prevents the smudge filter from running, and the sync completes successfully. For any projects that have LFS objects, `git lfs pull` must be executed. [1] https://github.com/github/git-lfs/issues/1422 Bug: Issue 224 Change-Id: I091ff37998131e2e6bbc59aa37ee352fe12d7fcd --- project.py | 1 + 1 file changed, 1 insertion(+) diff --git a/project.py b/project.py index 918ee09c..b8b98e44 100644 --- a/project.py +++ b/project.py @@ -2235,6 +2235,7 @@ class Project(object): for key in ['user.name', 'user.email']: 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') if self.manifest.IsMirror: self.config.SetString('core.bare', 'true') else: