Subject: Re: rebase-merge/done: No such file or directory

From: Adeodato Simó <[email-masked]>
Date: Tue, 13 Jan 2009 00:02:28 +0100

* Johannes Schindelin [Mon, 12 Jan 2009 23:47:47 +0100]:

> > $DONE might not exist. Do test -f $DONE before you grep it.

> I cannot reproduce here.  Since all the files in .git/rebase-merge/ are 
> internal files to rebase--interactive, I think we do not have to guard 
> against any possible user action rendering assumptions about internals 
> invalid.

> Wasting a minute, I seem to understand why I cannot reproduce.  Just 
> looking all of _two_ lines above the line you mentioned:

> 	sed -e 1q < "$TODO" >> "$DONE"

> Hrmpf.  You're right.  The user could have removed "$DONE"e between the 
> two lines ;-)

No, not really. Start a rebase -i. Change the *first* "pick" to a
"squash". Save and exit the editor. You'll see the output jidanni
mentioned:

  grep: .git/rebase-merge/done: No such file or directory
  Cannot 'squash' without a previous commit

The second line tells the user what happened (what their error was), but
I guess we could do without the first one.

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Debugging is twice as hard as writing the code in the first place. Therefore,
if you write the code as cleverly as possible, you are, by definition, not
smart enough to debug it.
                -- Brian W. Kernighan