add git-annex filter-process

filter-process: New command that can make git add/checkout faster when
there are a lot of unlocked annexed files or non-annexed files, but that
also makes git add of large annexed files slower.

Use it by running: git
config filter.annex.process 'git-annex filter-process'

Fully tested and working, but I have not benchmarked it at all.
And, incremental hashing is not done when git add uses it, so extra work is
done in that case.

Sponsored-by: Mark Reidenbach on Patreon
This commit is contained in:
Joey Hess 2021-11-04 15:02:36 -04:00
parent d706b49979
commit 68257e9076
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
10 changed files with 254 additions and 43 deletions

View file

@ -101,9 +101,14 @@ writePktLine h (PktLine b)
hFlush h
{- Maximum possible length of the string encoded in PktLine;
- the length header takes up 4 bytes. -}
- the length header takes up 4 bytes.
-
- While the 4 byte length header can express lengths up to 65535,
- git actually does not support packets larger than 65520 (including the
- header). See "LARGE_PACKET_MAX" in the git source code.
-}
maxPktLineLength :: Int
maxPktLineLength = 65535 - 4
maxPktLineLength = 65520 - 4
flushPkt :: PktLine
flushPkt = PktLine mempty