From: tom fogal <tfogal@sci.utah.edu>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: rebuild repo from data, packfiles?
Date: Sat, 20 Nov 2010 19:44:52 -0700 [thread overview]
Message-ID: <auto-000024045093@sci.utah.edu> (raw)
In-Reply-To: Your message of "Sat, 20 Nov 2010 18:16:48 CST." <20101121001643.GB27666@burratino>
Hi John, thanks for the help.
Jonathan Nieder <jrnieder@gmail.com> writes:
> tom fogal wrote:
>
> > Long story short, I lost some metadata in a repo I've got.
> > However, my entire .git/objects/ && subdirs is intact, so I'm
> > hopeful my data's still accessible in some form.
Turns out I'm dumber than I thought =(. I had a lot of trouble with
trees seemingly becoming invalid after a bit... my shell history's got
an rm -r and deleted a lone packfile before I thought "what the hell am
I doing?!" and stopped, so that must be it.
> Here's what I'd suggest.
[snip]
The repository-layout info and the lost-found option to fsck were both
new to me, and quite useful. Thanks!
Where I'm at now: through lost-found, mucking with metadata enough
that git-log and format-patch work, and re-creating a repo to apply
patches onto, I've got a lot of my work back. There's a 3 or 4 week
gap though, and of course git has trouble dealing with that; some of my
"patches" actually add entire files and the like.
If I git cat-file -p all of the `commit' and `blob' sha1's in
.git/objects, it looks to me like all my code is there, I just need to
get it out somehow.
My thought is to cat-file all my commits, filter out the ones which are
upstream, order them by date, and git-am them back into a repo.
Some of my data only exist in blobs, though... maybe git-diff-tree
can get me the patch I need? Not quite sure what to diff it with,
though... maybe the most-recent sha1 I have, based on date?
Other ideas would certainly be welcome!
-tom
next prev parent reply other threads:[~2010-11-21 2:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-20 22:54 rebuild repo from data, packfiles? tom fogal
2010-11-21 0:16 ` Jonathan Nieder
2010-11-21 2:44 ` tom fogal [this message]
2010-11-21 3:27 ` Jonathan Nieder
2010-11-21 3:55 ` tom fogal
2010-11-21 4:19 ` Jonathan Nieder
2010-11-21 19:51 ` tom fogal
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=auto-000024045093@sci.utah.edu \
--to=tfogal@sci.utah.edu \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.