diff options
author | David Pursehouse <dpursehouse@collab.net> | 2016-08-16 12:11:12 +0900 |
---|---|---|
committer | David Pursehouse <dpursehouse@collab.net> | 2016-08-16 21:55:36 +0900 |
commit | 76a4a9df86e9f969caf1fdd9e6d2f3ec5f18e94f (patch) | |
tree | 6ad547c43b522e8f6df7fbd6a07d4cced9a692a7 /project.py | |
parent | befaec1e56e70582249f6cd4a5f9de5c012ad718 (diff) | |
download | git-repo-76a4a9df86e9f969caf1fdd9e6d2f3ec5f18e94f.tar.gz |
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
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2235,6 +2235,7 @@ class Project(object): | |||
2235 | for key in ['user.name', 'user.email']: | 2235 | for key in ['user.name', 'user.email']: |
2236 | if m.Has(key, include_defaults=False): | 2236 | if m.Has(key, include_defaults=False): |
2237 | self.config.SetString(key, m.GetString(key)) | 2237 | self.config.SetString(key, m.GetString(key)) |
2238 | self.config.SetString('filter.lfs.smudge', 'git-lfs smudge --skip -- %f') | ||
2238 | if self.manifest.IsMirror: | 2239 | if self.manifest.IsMirror: |
2239 | self.config.SetString('core.bare', 'true') | 2240 | self.config.SetString('core.bare', 'true') |
2240 | else: | 2241 | else: |