git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: tom fogal <tfogal@sci.utah.edu>
Cc: git@vger.kernel.org
Subject: Re: rebuild repo from data, packfiles?
Date: Sat, 20 Nov 2010 21:27:07 -0600	[thread overview]
Message-ID: <20101121032707.GA11571@burratino> (raw)
In-Reply-To: <auto-000024045093@sci.utah.edu>

tom fogal wrote:

> 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!

What did "git fsck" say?

If it is possible to unambiguously recover your data without using any
external knowledge, then that would imply a bug imho --- why doesn't
git do it automatically?  Chances are some objects are missing ---
blobs, trees, commits, or tags --- and you will have to fill in some
information for a full recovery.

Perhaps you have another copy of those objects somewhere.  Have you
ever cloned this repo or pushed to another machine?

Sometimes it is possible to recover some specific object with
detective work; see howto/recover-corrupted-blob-object.txt in the
Documentation directory for an example of that.

git does not use text diffs for its object storage.  The information
the repository can give you directly consists of binary deltas and
full objects.

Are the old refs (branches and tags) intact?  More generally, what
files does

 ls -lR .git

list in the old repository?

Regards,
Jonathan

  reply	other threads:[~2010-11-21  3:28 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
2010-11-21  3:27     ` Jonathan Nieder [this message]
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=20101121032707.GA11571@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tfogal@sci.utah.edu \
    /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).