aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/Corrupted_.git__47__annex__47__index_when_running_assistant/comment_4_5a26a33c34594ec6eb50bd675d68801a._comment
blob: 4b41d988d5dcafd7b2ad6ed2e4e1f21468e3bf1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[[!comment format=mdwn
 username="joey"
 subject="""comment 4"""
 date="2015-06-15T18:05:38Z"
 content="""
git does update the index file atomically (via `rename(2)`) but
that doesn't necessarily mean that the filesystem writes all
the data to disk before there is a problem.

That's a good point about `git gc` and the index; it does look
at the regular git index. But, `git gc` seems unlikely to cause any problem,
even if .git/annex/index  pointed to a newer object that the git-annex branch
hadn't yet been updated to refer to; since `git gc` defaults to only
pruning objects that are 2 weeks old. The time that an object would
normally be in .git/annex/index without getting flushed in a commit
is normally measured in seconds to minutes.
"""]]