From: Drew Northup <n1xim.email@gmail.com>
To: Enrico Weigelt <enrico.weigelt@vnc.biz>
Cc: Jeff King <peff@peff.net>, git <git@vger.kernel.org>
Subject: Re: Auto-repo-repair
Date: Tue, 20 Nov 2012 06:56:17 -0500 [thread overview]
Message-ID: <CAM9Z-n=tAcpQHTU7WHhzZkoVL_ar9vcH8G1tKd-026+djAiJ4A@mail.gmail.com> (raw)
In-Reply-To: <fd162e10-46a8-433c-80b2-c1c4185c2032@zcs>
On Mon, Nov 19, 2012 at 5:35 PM, Enrico Weigelt <enrico.weigelt@vnc.biz> wrote:
>
>> >> How would the broken repository be sure of what it is missing to
>> >> request it from the other side?
>> >
>> > fsck will find missing objects.
>>
>> And what about the objects referred to by objects that are missing?
>
> Will be fetched after multiple iterations.
> We could even introduce some 'fsck --autorepair' mode, which triggers
> it to fetch any missing object from its remotes.
>
> Maybe even introduce a concept of peer object stores, which (a bit like
> alternates) are asked for objects that arent locally availabe - that
> could be even a plain venti store.
I still think that it would make the most sense to do the following
(if you insist on some sort of automated repair):
(1) Fetch a "good" clone (or clones) into a temporary directory;
(2) Cannibalize the objects from it (them);
(3) Re-run git fsck and check for still-missing / unreachable items;
(4) IF THE RESULT OF (3) IS ACCEPTABLE, run git gc to clean up the
mess, discard / "merge" duplicate objects, and fix up the packfiles.
It is step (4) that requires the most user interaction. I could see
building up a shell script that does all but (4) nearly automatically.
None of this requires modifying Git itself.
--
-Drew Northup
--------------------------------------------------------------
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
next prev parent reply other threads:[~2012-11-20 11:56 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 ` Auto-repo-repair Jeff King
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 ` Drew Northup [this message]
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='CAM9Z-n=tAcpQHTU7WHhzZkoVL_ar9vcH8G1tKd-026+djAiJ4A@mail.gmail.com' \
--to=n1xim.email@gmail.com \
--cc=enrico.weigelt@vnc.biz \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).