git-annex/doc/git-annex-filter-process.mdwn
Joey Hess 68257e9076
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
2021-11-04 15:02:36 -04:00

48 lines
1.5 KiB
Markdown

# NAME
git-annex filter-process - long running git filter process for git-annex
# SYNOPSIS
git annex filter-process
# DESCRIPTION
By default, `git-annex smudge` is used as the git filter driver.
This is an alternative way to accomplish the same thing, using git's
long-running filter process interface.
To enable using this, run:
git config filter.annex.process 'git-annex filter-process'
There will be no visible difference in behavior between enabling this and
not, besides changes in speed and memory use when using git.
When this is not enabled, each file that git wants to filter involves
starting up a new `git-annex smudge` process. Starting many such processes
for many files can be slow, and can make commands like `git checkout` and
`git add` slow when they are operating on a lot of files. (A lot of locked
annexed files do not make `git checkout` slow, but unlocked files and
non-annexed files do slow it down.)
On the other hand when this is enabled, `git add` of a large file does an
unncessary extra read of the file, and pipes its contents into git-annex.
So if you enable this, it will be faster to use `git-annex add` to add
large files to the annex, rather than `git add`. Other commands that
add files, like `git commit -a`, are also impacted by this.
# OPTIONS
* The [[git-annex-common-options]](1) can be used.
# SEE ALSO
[[git-annex]](1)
[[git-annex-smudge]](1)
# AUTHOR
Joey Hess <id@joeyh.name>
Warning: Automatically converted into a man page by mdwn2man. Edit with care.