Merge pull request #4407 from bk2204/prune-diff-driver
lfs: don't invoke diff drivers when pruning repositories
This commit is contained in:
commit
c3bdc050a1
@ -29,6 +29,8 @@ var (
|
|||||||
// Arguments to append to a git log call which will limit the output to
|
// Arguments to append to a git log call which will limit the output to
|
||||||
// lfs changes and format the output suitable for parseLogOutput.. method(s)
|
// lfs changes and format the output suitable for parseLogOutput.. method(s)
|
||||||
logLfsSearchArgs = []string{
|
logLfsSearchArgs = []string{
|
||||||
|
"--no-ext-diff",
|
||||||
|
"--no-textconv",
|
||||||
"-G", "oid sha256:", // only diffs which include an lfs file SHA change
|
"-G", "oid sha256:", // only diffs which include an lfs file SHA change
|
||||||
"-p", // include diff so we can read the SHA
|
"-p", // include diff so we can read the SHA
|
||||||
"-U12", // Make sure diff context is always big enough to support 10 extension lines to get whole pointer
|
"-U12", // Make sure diff context is always big enough to support 10 extension lines to get whole pointer
|
||||||
|
19
t/t-prune.sh
19
t/t-prune.sh
@ -858,3 +858,22 @@ begin_test "prune --force"
|
|||||||
refute_local_object "$oid_inrepo" "${#content_inrepo}"
|
refute_local_object "$oid_inrepo" "${#content_inrepo}"
|
||||||
)
|
)
|
||||||
end_test
|
end_test
|
||||||
|
|
||||||
|
begin_test "prune does not invoke external diff programs"
|
||||||
|
(
|
||||||
|
set -e
|
||||||
|
|
||||||
|
reponame="prune-external-diff"
|
||||||
|
setup_remote_repo "remote-$reponame"
|
||||||
|
|
||||||
|
clone_repo "remote-$reponame" "clone-$reponame"
|
||||||
|
|
||||||
|
git config diff.word.textconv 'false'
|
||||||
|
echo "*.dot diff=word" >.git/info/attributes
|
||||||
|
|
||||||
|
for n in $(seq 1000); do (echo "$n" > "$n.dot") done
|
||||||
|
git add .
|
||||||
|
git commit -am "initial"
|
||||||
|
git lfs prune
|
||||||
|
)
|
||||||
|
end_test
|
||||||
|
Loading…
Reference in New Issue
Block a user