git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Denis Bueno <denbuen@sandia.gov>
Cc: Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: Git clone error
Date: Wed, 1 Aug 2007 09:36:47 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.999.0708010929070.3582@woody.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.0.999.0708010846360.3582@woody.linux-foundation.org>



On Wed, 1 Aug 2007, Linus Torvalds wrote:
> 
> > If I just recreate a version I'm happy with, can I add that to the repo and
> > go from there?
> 
> Well, it's not so much a version _you_ are happy with: you'd have to be 
> able to re-create the exact old version (with the exact same SHA1), in 
> order for git to be happy.

Btw, if you really cannot re-generate it, you'd basically need to create a 
whole new git archive without that blob (or basically with that blob 
replaced by another version).

We don't have wonderfully good support for that, because, quite frankly, 
we've not had this happen before. I think every time before, people have 
had the blob in some other copy of their git archive.

But the thing to use is "git filter-branch", which can take a git history 
and munge it arbitrarily. It would be the "tree-filter" that you'd use to 
replace that one blob that you cannot regenerate with another (ie you 
might decide to just replace the original version of the file with that 
*second* version, and regenerate the tree that way).

I'm cc'ing Dscho explicitly to see if he can help you with the exact 
syntax, and maybe we could even make this into a user-manual entry about 
how to handle corruption. I don't think we have anything in the 
documentation about this - we only cover the trivial cases where the 
objects are all good, but you've lost the pointers into it because you 
removed a branch by mistake or something.

		Linus

  reply	other threads:[~2007-08-01 16:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 23:45 Git clone error Denis Bueno
2007-08-01  0:22 ` Junio C Hamano
2007-08-01  2:38 ` Linus Torvalds
2007-08-01 14:24   ` Denis Bueno
2007-08-01 16:19     ` Linus Torvalds
2007-08-01 16:36       ` Linus Torvalds [this message]
2007-08-01 17:17         ` Johannes Schindelin
2007-08-01 20:22           ` Denis Bueno
2007-08-01 21:12             ` Johannes Schindelin
2007-08-02 15:08               ` Denis Bueno
2007-08-02 17:08                 ` Johannes Schindelin
2007-08-02 17:40                   ` Linus Torvalds
2007-08-01 16:37       ` Steffen Prohaska
  -- strict thread matches above, loose matches on Subject: below --
2008-04-05 17:20 git " Chuck Ritter
2008-04-05 20:09 ` Junio C Hamano
2008-08-28 12:57 Git " srinivasan.malligarjunan
2008-08-28 14:11 ` Andreas Ericsson

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=alpine.LFD.0.999.0708010929070.3582@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=denbuen@sandia.gov \
    --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).