{"thread":{"id":"35357","subject":"[announce] git-repair","startedAt":"2013-11-18T18:13:50Z","lastAt":"2013-11-18T18:13:50Z","messageCount":1,"participants":["Joey Hess"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"230772","messageId":"20131118181350.GA28776@kitenet.net","threadId":"35357","inReplyTo":null,"subject":"[announce] git-repair","fromName":"Joey Hess","fromEmail":"joey@kitenet.net","sentAt":"2013-11-18T18:13:50Z","receivedAt":"2013-11-18T18:13:50Z","isPatch":false,"sender":{"key":"joey@kitenet.net","avatar":"https://avatars.githubusercontent.com/u/16392?v=4"},"body":"I've created git-repair as a small spinoff from git-annex.\n\nhttp://git-repair.branchable.com/\n\ngit-repair is a complement to git fsck, which only finds problems, but\ndoes not try to fix them.\n\nAt its simplest, git-repair deletes all corrupt objects and corrupt\npacks, makes a fresh clone from a remote[1] and rsyncs the missing\nobjects back into the repository.\n\nIf that is not sufficient to fully recover the repository, it can also\nreset branches back to commits before the corruption happened, delete\nbranches that are no longer available due to the lost data, and remove\nany missing files from the index. It will only do this if run with the\n--force option, since that rewrites history and throws out missing data.\n\nI would be very sad to have to use git-repair --force on a git\nrepository holding source code, although it might manage to preserve\ncommits that I had forgotten to push. It's more likely to be useful in a\ngit repository being used for non-source-code purposes, where the loss\nof some files won't break the build of a program.\n\n[1] It would be more efficient if it could git fetch individual missing\n    objects from the remote, but my current understanding is that the\n    git protocols do not allow doing that.\n\n-- \nsee shy jo\n"}]}