File: day_40__another_fine_mess.mdwn

package info (click to toggle)
git-annex 5.20141125
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 37,828 kB
  • ctags: 583
  • sloc: haskell: 42,582; sh: 1,080; ansic: 498; makefile: 316; perl: 125
file content (15 lines) | stat: -rw-r--r-- 921 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Solid day of working on repository recovery. Got `git recover-repository
--force` working, which involves fixing up branches that refer to missing
objects. Mostly straightforward traversal of git commits, trees, blobs, to
find when a branch has a problem, and identify an old version of it that
predates the missing object. (Can also find them in the reflog.) 

The main complication turned out to be that `git branch -D` and `git
show-ref` don't behave very well when the commit objects pointed to by refs
are themselves missing. And git has no low-level plumbing that avoids
falling over these problems, so I had to write it myself.

Testing has turned up one unexpected problem: Git's index can itself refer
to missing objects, and that will break future commits, etc. So I need to
find a way to validate the index, and when it's got problems,
either throw it out, or possibly recover some of the staged data from it.