From: Jeff King <peff@peff.net>
To: Enrico Weigelt <enrico.weigelt@vnc.biz>
Cc: git <git@vger.kernel.org>
Subject: Re: Auto-repo-repair
Date: Fri, 16 Nov 2012 11:00:04 -0800 [thread overview]
Message-ID: <20121116190004.GA2310@sigill.intra.peff.net> (raw)
In-Reply-To: <dbae3a06-c14b-4c06-9863-ae4771968fe1@zcs>
On Fri, Nov 16, 2012 at 06:51:45PM +0100, Enrico Weigelt wrote:
> I've broken some repo (missing objects), eg by messing something up
> w/ alternates, broken filesystem, or whatever. And I've got a bunch
> of remotes which (together) contain all of the lost objects.
>
> Now I'd like to run some $magic_command which automatically fetches
> all the missing objects and so repair my local repo.
>
> Is this already possible right now ?
You can't reliably just grab the broken objects, because most transports
don't support grabbing arbitrary objects (you can do it if you have
shell access to a known-good repository, but it's not automated).
The simplest thing is usually to re-clone the known-good remotes, then
copy the resulting packfiles into your original repository. You'll have
duplicated objects until your next "gc", but the resulting repack should
skip any corrupted objects and use the known-good ones.
-Peff
next prev parent reply other threads:[~2012-11-16 19:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <0c0e34a4-16ab-40a0-9293-af94e34e4290@zcs>
2012-11-16 17:51 ` Auto-repo-repair Enrico Weigelt
2012-11-16 19:00 ` Jeff King [this message]
2012-11-17 9:21 ` Auto-repo-repair Enrico Weigelt
2012-11-18 16:37 ` Auto-repo-repair Drew Northup
2012-11-18 16:55 ` Auto-repo-repair Enrico Weigelt
2012-11-19 3:30 ` Auto-repo-repair Drew Northup
2012-11-19 22:35 ` Auto-repo-repair Enrico Weigelt
2012-11-20 11:56 ` Auto-repo-repair Drew Northup
2012-11-22 23:16 ` Auto-repo-repair Enrico Weigelt
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=20121116190004.GA2310@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=enrico.weigelt@vnc.biz \
--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).