From: Joey Hess <joey@kitenet.net>
To: git@vger.kernel.org
Subject: [announce] git-repair
Date: Mon, 18 Nov 2013 14:13:50 -0400 [thread overview]
Message-ID: <20131118181350.GA28776@kitenet.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]
I've created git-repair as a small spinoff from git-annex.
http://git-repair.branchable.com/
git-repair is a complement to git fsck, which only finds problems, but
does not try to fix them.
At its simplest, git-repair deletes all corrupt objects and corrupt
packs, makes a fresh clone from a remote[1] and rsyncs the missing
objects back into the repository.
If that is not sufficient to fully recover the repository, it can also
reset branches back to commits before the corruption happened, delete
branches that are no longer available due to the lost data, and remove
any missing files from the index. It will only do this if run with the
--force option, since that rewrites history and throws out missing data.
I would be very sad to have to use git-repair --force on a git
repository holding source code, although it might manage to preserve
commits that I had forgotten to push. It's more likely to be useful in a
git repository being used for non-source-code purposes, where the loss
of some files won't break the build of a program.
[1] It would be more efficient if it could git fetch individual missing
objects from the remote, but my current understanding is that the
git protocols do not allow doing that.
--
see shy jo
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
reply other threads:[~2013-11-18 18:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131118181350.GA28776@kitenet.net \
--to=joey@kitenet.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).