diff options
author | 2012-06-06 14:29:10 -0400 | |
---|---|---|
committer | 2012-06-06 14:29:10 -0400 | |
commit | b819f644ad00c5ad13ba5b249d3e127fd59d8694 (patch) | |
tree | 6882fedee5af6ee4406ef68b9ec1ec50822f64e9 /Command/Commit.hs | |
parent | 91db54076964979b6c50bd7efd0b895c4d416978 (diff) |
close the git add race
There's a race adding a new file to the annex: The file is moved to the
annex and replaced with a symlink, and then we git add the symlink. If
someone comes along in the meantime and replaces the symlink with
something else, such as a new large file, we add that instead. Which could
be bad..
This race is fixed by avoiding using git add, instead the symlink is
directly staged into the index.
It would be nice to make `git annex add` use this same technique.
I have not done so yet because it currently runs git update-index once per
file, which would slow does `git annex add`. A future enhancement would be
to extend the Git.Queue to include the ability to run update-index with
a list of Streamers.
Diffstat (limited to 'Command/Commit.hs')
0 files changed, 0 insertions, 0 deletions