diff options
author | XD Trol <milestonejxd@gmail.com> | 2022-01-17 23:29:04 +0800 |
---|---|---|
committer | XD Trol <milestonejxd@gmail.com> | 2022-01-26 01:47:20 +0000 |
commit | 630876f9e4910a4c91705c6cc98414123547419a (patch) | |
tree | aa7c9374ce0aba3107c563ab7c3407c10b54e735 /repo | |
parent | 4aa8584ec6a57b24c7e41e6fccd0b554a264423d (diff) | |
download | git-repo-630876f9e4910a4c91705c6cc98414123547419a.tar.gz |
init: add an option --enable-git-lfs-filter
It was reported that git-lfs did not work with git-repo. Specifically,
`git read-tree -u` run by `repo sync` would fail git-lfs's smudge
filter. See https://github.com/github/git-lfs/issues/1422.
In fact, by the time `git read-tree -u` is run, the repository is not
bare. It is just that, the working directory is not the same as the
.git directory. git-lfs's filter should work. No one seems to have
delved into that issue.
Today, with newer versions of git-repo and git-lfs, that issue will
not reproduce. Tested with
- git 2.33, git-lfs 2.13 on macOS
- git 2.17, git-lfs 2.3 on ubuntu
So, it seems fine to add an option --enable-git-lfs-filter, default to
false, and stat that it may not work with older versions of git and
git-lfs in the help doc.
Bug: https://crbug.com/gerrit/14516
Change-Id: I8d21854eeeea541e072f63d6b10ad1253b1a9826
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/328359
Tested-by: XD Trol <milestonejxd@gmail.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'repo')
-rwxr-xr-x | repo | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -149,7 +149,7 @@ if not REPO_REV: | |||
149 | BUG_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue' | 149 | BUG_URL = 'https://bugs.chromium.org/p/gerrit/issues/entry?template=Repo+tool+issue' |
150 | 150 | ||
151 | # increment this whenever we make important changes to this script | 151 | # increment this whenever we make important changes to this script |
152 | VERSION = (2, 17) | 152 | VERSION = (2, 21) |
153 | 153 | ||
154 | # increment this if the MAINTAINER_KEYS block is modified | 154 | # increment this if the MAINTAINER_KEYS block is modified |
155 | KEYRING_VERSION = (2, 3) | 155 | KEYRING_VERSION = (2, 3) |
@@ -382,6 +382,11 @@ def InitParser(parser, gitc_init=False): | |||
382 | group.add_option('--no-clone-bundle', | 382 | group.add_option('--no-clone-bundle', |
383 | dest='clone_bundle', action='store_false', | 383 | dest='clone_bundle', action='store_false', |
384 | help='disable use of /clone.bundle on HTTP/HTTPS (default if --partial-clone)') | 384 | help='disable use of /clone.bundle on HTTP/HTTPS (default if --partial-clone)') |
385 | group.add_option('--git-lfs', action='store_true', | ||
386 | help='enable Git LFS support') | ||
387 | group.add_option('--no-git-lfs', | ||
388 | dest='git_lfs', action='store_false', | ||
389 | help='disable Git LFS support') | ||
385 | 390 | ||
386 | # Tool. | 391 | # Tool. |
387 | group = parser.add_option_group('repo Version options') | 392 | group = parser.add_option_group('repo Version options') |