From: "Denis Bueno" <dbueno@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: Recovering from repository corruption
Date: Tue, 10 Jun 2008 13:26:51 -0400 [thread overview]
Message-ID: <6dbd4d000806101026m458513ecqa8141f509bad7602@mail.gmail.com> (raw)
I started a thread a while back about repository corruption. It
manifested as a clone error and the thread is here:
http://kerneltrap.org/mailarchive/git/2007/7/31/253475
I just ran, again, into corruption after my laptop kernel-panic'd.
(Ironically, at the moment I ran into the corruption I was trying to
push my repo to a backup location.) Since that thread took place it
seems a section about recovering from repo corruption was added to the
manual --- but it assumes you can (or care to painstakingly) recreate
each corrupted version.
I made several changes to one file, home.html, and now have the
following corruption:
identity.corrupt[56] > git fsck --full
error: 320bd6e82267b71dd2ca7043ea3f61dbbca16109: object corrupt or missing
error: 4d0be2816d5eea5ae2b40990235e2225c1715927: object corrupt or missing
missing blob 320bd6e82267b71dd2ca7043ea3f61dbbca16109
missing blob 4d0be2816d5eea5ae2b40990235e2225c1715927
I know which commits these hashes correspond to, and I know roughly
what I did in those commits, but, I really don't care that much, and
anyway it will be painful to recreate them because of
whitespace/formatting issues. Here are the commits, in case it is
relevant:
commit 163a93df14d246dee91c3a503e6372b8313f337d
Author: Denis Bueno <dbueno@gmail.com>
Date: Tue Jun 10 09:45:41 2008 -0400
Add lambda-the-ultimate link
:100644 100644 320bd6e... 2ab4775... M home.html
[... intervenent commits ...]
commit 4737fea59fdc8325e09b5206cc7a6ac593446ce3
Author: Denis Bueno <dbueno@gmail.com>
Date: Tue Jun 10 09:37:12 2008 -0400
Hoogle up top too
:100644 100644 4d0be28... c6fe111... M home.html
Assuming I can't recreate the hashed files, what are my options?
I was told in the thread above that I could use grafts and "git
filter-branch" to create a new repository that simply got rid of the
offending object. That case was simpler, as it was the initial import
of a file that had only two commits total that was corrupted.
However, in this case there are changes between the initial and latest
version of the file, and commits between the corrupted versions, so, I
can imagine that it would be hard to get rid of in-between commits.
The thing that makes sense intuitively (read: not as a Git expert, but
as a user) is to just let me replace the commits associated with the
problematic objects with new versions of those commits (e.g. make
change described in the commit message, which is different from the
actual change that was recorded, due to whitespace/formatting issues).
Is this what I should do? And to do so, should I be reading chapter
5 of the manual?
Thanks.
--
Denis
next reply other threads:[~2008-06-10 17:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 17:26 Denis Bueno [this message]
2008-06-10 17:55 ` Recovering from repository corruption Jakub Narebski
2008-06-10 19:38 ` Denis Bueno
2008-06-10 19:59 ` Jakub Narebski
2008-06-10 20:03 ` Denis Bueno
2008-06-10 20:14 ` Jakub Narebski
2008-06-10 20:35 ` Denis Bueno
2008-06-10 20:23 ` Linus Torvalds
2008-06-10 20:28 ` Denis Bueno
2008-06-10 21:09 ` Linus Torvalds
2008-06-10 21:22 ` Denis Bueno
2008-06-10 21:48 ` Linus Torvalds
2008-06-10 22:09 ` Denis Bueno
2008-06-10 22:25 ` Tarmigan
2008-06-10 22:41 ` Denis Bueno
2008-06-10 22:45 ` Linus Torvalds
2008-06-10 23:00 ` Linus Torvalds
2008-06-11 0:43 ` Nicolas Pitre
2008-06-11 1:39 ` Linus Torvalds
2008-06-11 1:47 ` Nicolas Pitre
2008-06-10 21:27 ` Denis Bueno
2008-06-10 22:52 ` Junio C Hamano
2008-06-11 23:21 ` To graft or not to graft... (Re: Recovering from repository corruption) Stephen R. van den Berg
2008-06-11 23:34 ` Jakub Narebski
2008-06-11 23:39 ` Linus Torvalds
2008-06-12 7:14 ` Johan Herland
2008-06-12 7:47 ` Jeff King
2008-06-12 10:21 ` Johan Herland
2008-06-12 12:20 ` Stephen R. van den Berg
2008-06-10 19:40 ` Recovering from repository corruption Nicolas Pitre
2008-06-10 19:42 ` Denis Bueno
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=6dbd4d000806101026m458513ecqa8141f509bad7602@mail.gmail.com \
--to=dbueno@gmail.com \
--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).