Files
git-crypt/commands.cpp
Andrew Ayer 1988ee3819 Speed up lock/unlock by using single git check-attr process
Previously, lock/unlock needed to spawn a separate `git check-attr`
process for every single file in the repository (whether encrypted
or not).  This was extremely inefficient, especially on Windows.

Now, git-crypt spawns a single `git check-attr` process and communicates
with it over stdin.  In a repository with thousands of files, this
results in a speedup of nearly 100x.

This relies on the --stdin and -z options to `git check-attr`, which
were only added in Git 1.8.5 (released 27 Nov 2013).  With older versions
of Git, git-crypt falls back to the old and slower code.
2015-05-24 18:55:58 -07:00

55 KiB