# [RFE] git rebase doesn't say it failed

5 messages from 2008-03-10 to 2008-03-10. Participants: Christian Holtje, Johannes Schindelin, Jakub Narebski.
Thread: https://gitlist.dev/t/12613

## Christian Holtje, 2008-03-10 03:20

Subject: [RFE] git rebase doesn't say it failed
Message-ID: <429AC7A2-511E-496F-9C1C-4627604EBBFB@gmail.com>
URL: https://gitlist.dev/e/429AC7A2-511E-496F-9C1C-4627604EBBFB%40gmail.com

```
Hello!

What happened:
  I tried to do a rebase and got a message about files "needs  
update".  However, it didn't say it did a rebase nor did it say that  
it failed.
Example:
+ git rebase origin/master
f1: needs update


What I expected:
  It should have said that it was unable to rebase because of these  
files.
Example:
+ git rebase origin/master
f1: needs update
Git was unable to rebase due to the files above.  Please commit them  
or move them out of the way.
Hint: See "git reset --help" for a suggestion about saving work in  
progress.


Notes:
I have had several users at the company that I work think that these  
messages meant that it worked fine.  There are some commands (like  
reset, co, etc.) that show these kind of messages and it isn't an  
error; they were conditioned to think they were acceptable messages.

version: 1.5.4.3

Shell script to recreate the problem:
#!/bin/sh

set -eux

rm -rf a b
mkdir a
cd a
git init
echo 1 > f1
echo 1 > f2
git add f?
git commit -m "init"

cd ..
git clone a b

cd b
echo 1.5 > f1

cd ../a
echo 2 > f2
git commit -m "2" f2

cd ../b
git fetch
git rebase origin/master

#EOF

```

## Johannes Schindelin, 2008-03-10 11:10

Subject: Re: [RFE] git rebase doesn't say it failed
Message-ID: <alpine.LSU.1.00.0803101207120.3975@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0803101207120.3975%40racer.site
In-Reply-To: <429AC7A2-511E-496F-9C1C-4627604EBBFB@gmail.com>

```
Hi,

On Sun, 9 Mar 2008, Christian Holtje wrote:

> Hello!
> 
> What happened:
> I tried to do a rebase and got a message about files "needs update".
> However, it didn't say it did a rebase nor did it say that it failed.

It told you that a file is dirty.  Git kinda expects you to know that it 
will not start a rebase on a dirty working directory.

So there _was_ an (implicit) message saying that it failed.

> Git was unable to rebase due to the files above.  Please commit them or move
> them out of the way.
> Hint: See "git reset --help" for a suggestion about saving work in progress.

The same comment I gave last week applies here: people complained that Git 
was too chatty.  I tend to agree, since the important information was lost 
in the huge amount of text.  Now you say we should make it chatty again?

Hth,
Dscho

```

## Jakub Narebski, 2008-03-10 11:53

Subject: Re: [RFE] git rebase doesn't say it failed
Message-ID: <fr37gm$9k4$2@ger.gmane.org>
URL: https://gitlist.dev/e/fr37gm%249k4%242%40ger.gmane.org
In-Reply-To: <alpine.LSU.1.00.0803101207120.3975@racer.site>

```
Johannes Schindelin wrote:

>> Git was unable to rebase due to the files above.  Please commit them or move
>> them out of the way.
>> Hint: See "git reset --help" for a suggestion about saving work in progress.
> 
> The same comment I gave last week applies here: people complained that Git 
> was too chatty.  I tend to agree, since the important information was lost 
> in the huge amount of text.  Now you say we should make it chatty again?

--verbose option, anyone?

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

```

## Johannes Schindelin, 2008-03-10 12:29

Subject: Re: [RFE] git rebase doesn't say it failed
Message-ID: <alpine.LSU.1.00.0803101329430.3975@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0803101329430.3975%40racer.site
In-Reply-To: <fr37gm$9k4$2@ger.gmane.org>

```
Hi,

On Mon, 10 Mar 2008, Jakub Narebski wrote:

> Johannes Schindelin wrote:
> 
> >> Git was unable to rebase due to the files above.  Please commit them or move
> >> them out of the way.
> >> Hint: See "git reset --help" for a suggestion about saving work in progress.
> > 
> > The same comment I gave last week applies here: people complained that Git 
> > was too chatty.  I tend to agree, since the important information was lost 
> > in the huge amount of text.  Now you say we should make it chatty again?
> 
> --verbose option, anyone?

Patches welcome,
Dscho

```

## Christian Holtje, 2008-03-10 14:33

Subject: Re: [RFE] git rebase doesn't say it failed
Message-ID: <5C9883C7-04F4-4786-980A-25958A4102F1@gmail.com>
URL: https://gitlist.dev/e/5C9883C7-04F4-4786-980A-25958A4102F1%40gmail.com
In-Reply-To: <alpine.LSU.1.00.0803101207120.3975@racer.site>

```

On Mar 10, 2008, at 7:10 AM, Johannes Schindelin wrote:

> On Sun, 9 Mar 2008, Christian Holtje wrote:
>
>> Hello!
>>
>> What happened:
>> I tried to do a rebase and got a message about files "needs update".
>> However, it didn't say it did a rebase nor did it say that it failed.
>
> It told you that a file is dirty.  Git kinda expects you to know  
> that it
> will not start a rebase on a dirty working directory.
>
> So there _was_ an (implicit) message saying that it failed.
>
>> Git was unable to rebase due to the files above.  Please commit  
>> them or move
>> them out of the way.
>> Hint: See "git reset --help" for a suggestion about saving work in  
>> progress.
>
> The same comment I gave last week applies here: people complained  
> that Git
> was too chatty.  I tend to agree, since the important information  
> was lost
> in the huge amount of text.  Now you say we should make it chatty  
> again?

I can see the problem with commands that execute correctly being too  
chatty, but here the command requested was not performed.  In the name  
of terseness, how about simply saying "rebase was not performed."

As a general rule, though, when I generate an error message I try to  
explain what happened and how the user should fix it, which is why I  
included the more verbose version above.

Ciao!

```
