summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar http://joeyh.name/ <http://joeyh.name/@web>2014-01-14 21:12:19 +0000
committerGravatar admin <admin@branchable.com>2014-01-14 21:12:19 +0000
commit78b10a2577f65471393943c4c105baf24dfec62a (patch)
treeb71076d0676683f4c6eb4b89f62ab583d14e4239
parentc093003a3e3062bb860c222c7f082c9457a309c0 (diff)
Added a comment
-rw-r--r--doc/bugs/index_file_smaller_than_expected/comment_1_d87ae8c4d384d2ce6d1286b51bfdeba1._comment17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/bugs/index_file_smaller_than_expected/comment_1_d87ae8c4d384d2ce6d1286b51bfdeba1._comment b/doc/bugs/index_file_smaller_than_expected/comment_1_d87ae8c4d384d2ce6d1286b51bfdeba1._comment
new file mode 100644
index 000000000..9cf0ce336
--- /dev/null
+++ b/doc/bugs/index_file_smaller_than_expected/comment_1_d87ae8c4d384d2ce6d1286b51bfdeba1._comment
@@ -0,0 +1,17 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ ip="209.250.56.43"
+ subject="comment 1"
+ date="2014-01-14T21:12:19Z"
+ content="""
+It's unusual for git's index file to get corrupted or short like this. git writes to .git/index by first writing the new content to .git/index.lock, and then once it's written, renaming it. So if git is interrupted in the middle of a write, it doesn't leave the index file truncated. Of course, it's somewhat up to the OS's filesystem and buffering, and so I suppose if the system loses power at just the right time, and the filesystem does not journal data, this could happen.
+
+Anyway, git-annex's assistant should be able to detect when the index file is corrupt, including too short, and fix it. When I try with a current version of git-annex, opening the webapp or starting the assistant results in the index file being automatically repaired, with this logged to .git/annex/daemon.log:
+
+<pre>
+fatal: index file smaller than expected
+[2014-01-14 16:58:11 JEST] SanityCheckerStartup: corrupt index file found at startup; removing and restaging
+</pre>
+
+However, it looks like it needs to do the same check for .git/annex/index. I was able to reproduce this bug by corrupting that file.
+"""]]