git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Denis Bueno" <denbuen@sandia.gov>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: Git clone error
Date: Wed, 01 Aug 2007 14:22:56 -0600	[thread overview]
Message-ID: <C2D647C0.2B60%denbuen@sandia.gov> (raw)
In-Reply-To: <Pine.LNX.4.64.0708011802020.14781@racer.site>

On 08/01/2007 11:17, "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
wrote:
> But this is what I would do if I had the problem: I would try to create
> a state which is as close to the corrupt revision as possible,
> use a graft to replace the initial commit with that revision, and
> rewrite the branch. I'd probably start by doing something like this:
> 
> $ git symbolic-ref HEAD refs/heads/recreate-first && rm .git/index
> $ git ls-tree -r --name-only <initial-commit> |
> grep -v "^condor/condor-uninstall.sh$" |
> xargs git checkout <initial-commit>
> $ git checkout <second-commit> condor/condor-uninstall.sh
> [possibly some minor hacking on the latter file to make it work]
> $ git commit -c <initial-commit>

Wow.  `commit' and `checkout' are the only two commands that I have ever
heard of in that sequence.

How difficult would it be to create a new git repo which is exactly the same
minus the initial condor-uninstall.sh commit?  That is, just to pretend the
initial import of condor-uninstall.sh never existed, and use the second
commit of the old repo the first commit of the new, and preserve the rest of
the history of the entire repo?  Or, to remove both condor-uninstall.sh
commits from the history -- deleting that history altogether -- and add it
back as a completely new file?

If I get enough courage, I'll attempt to understand exactly what it is
you're doing in the commands above and try it out on (a copy of) the repo.
My willingness to part with the current history and just reinitialise the
repo with its current contents increases with time, though.

The real problem is that I'm sure I have no idea exactly what the first
version of the file looked like, and how it differed from the next one.

                      Denis
--
"If we wish to count lines of code, we should not regard them as lines
produced but as lines spent." -- Edsger Dijkstra

  reply	other threads:[~2007-08-01 20:23 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
2007-08-01 17:17         ` Johannes Schindelin
2007-08-01 20:22           ` Denis Bueno [this message]
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=C2D647C0.2B60%denbuen@sandia.gov \
    --to=denbuen@sandia.gov \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).