fix v6 deadlock with git 2.1.4

I don't know why git diff --raw would run the clean filter, but it did
with this version of git. Perhaps it is cleaning the file to generate the
diff to search with -G?  But then why would newer gits not run the clean
filter?

It caused git annex to deadlock because the keys database was locked
and ran a git command that ran git-annex, which tried to read from the
keys database.

This commit was sponsored by Brett Eisenberg on Patreon.
This commit is contained in:
Joey Hess 2018-09-13 13:55:25 -04:00
parent b18fb1e343
commit a7f0b99a33
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -245,6 +245,12 @@ reconcileStaged qh = whenM versionUsesKeysDatabase $ do
-- Avoid using external diff command, which would be slow. -- Avoid using external diff command, which would be slow.
-- (The -G option may make it be used otherwise.) -- (The -G option may make it be used otherwise.)
[ Param "-c", Param "diff.external=" [ Param "-c", Param "diff.external="
-- Avoid running smudge or clean filters, since we want the
-- raw output, and they would block trying to access the
-- locked database. The --raw normally avoids git diff
-- running them, but older versions of git need this.
, Param "-c", Param "filter.annex.smudge="
, Param "-c", Param "filter.annex.clean="
, Param "diff" , Param "diff"
, Param "--cached" , Param "--cached"
, Param "--raw" , Param "--raw"