# git UI nit

8 messages from 2006-12-06 to 2006-12-06. Participants: Han-Wen Nienhuys, Jakub Narebski, Johannes Schindelin.
Thread: https://gitlist.dev/t/43339

## Han-Wen Nienhuys, 2006-12-06 14:22

Subject: git UI nit
Message-ID: <el6jmt$mej$1@sea.gmane.org>
URL: https://gitlist.dev/e/el6jmt%24mej%241%40sea.gmane.org

```

When merging changes into a dirty working copy, one may get 

..
Updating 62a005d..7bbd698
Makefile: needs update
README: needs update
config.mak.in: needs update
configure.ac: needs update
fatal: Entry 'Makefile' not uptodate. Cannot merge.
..


This is bad error message; "uptodate" suggests that Makefile is too old. 
The problem is the reverse.  The Makefile has been
edited and hence it is 'newer'.  

This message should say 

 Entry 'Makefile' is dirty. 
 Revert or commit changes before merging

-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

```

## Johannes Schindelin, 2006-12-06 14:46

Subject: Re: git UI nit
Message-ID: <Pine.LNX.4.63.0612061546190.28348@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0612061546190.28348%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <el6jmt$mej$1@sea.gmane.org>

```
Hi,

On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:

> 
> When merging changes into a dirty working copy, one may get 
> 
> ..
> Updating 62a005d..7bbd698
> Makefile: needs update
> README: needs update
> config.mak.in: needs update
> configure.ac: needs update
> fatal: Entry 'Makefile' not uptodate. Cannot merge.
> ..
> 
> 
> This is bad error message; "uptodate" suggests that Makefile is too old. 
> The problem is the reverse.  The Makefile has been
> edited and hence it is 'newer'.  

Something like this?

-- snip --
[PATCH] Replace "needs update" by "dirty; needs commit"

This should clarify why a merge was not even started.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

 read-cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/read-cache.c b/read-cache.c
index eae4745..0d22de2 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -721,7 +721,7 @@ int refresh_cache(unsigned int flags)
 			}
 			if (quiet)
 				continue;
-			printf("%s: needs update\n", ce->name);
+			printf("%s: dirty; needs commit\n", ce->name);
 			has_errors = 1;
 			continue;

```

## Han-Wen Nienhuys, 2006-12-06 15:09

Subject: Re: git UI nit
Message-ID: <4576DD27.6050307@xs4all.nl>
URL: https://gitlist.dev/e/4576DD27.6050307%40xs4all.nl
In-Reply-To: <Pine.LNX.4.63.0612061546190.28348@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin escreveu:
>  			}
>  			if (quiet)
>  				continue;
> -			printf("%s: needs update\n", ce->name);
> +			printf("%s: dirty; needs commit\n", ce->name);

Yes - I'd just mention revert as an option too. 
 

-- 

```

## Johannes Schindelin, 2006-12-06 15:20

Subject: Re: git UI nit
Message-ID: <Pine.LNX.4.63.0612061619120.28348@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0612061619120.28348%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <4576DD27.6050307@xs4all.nl>

```
Hi,

On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:

> Johannes Schindelin escreveu:
> >  			}
> >  			if (quiet)
> >  				continue;
> > -			printf("%s: needs update\n", ce->name);
> > +			printf("%s: dirty; needs commit\n", ce->name);
> 
> Yes - I'd just mention revert as an option too. 

Actually, I like it that short.

We had an email on this list, where the poster said he could not merge 
with Git. It turned out that the merge failed with conflicts, but he 
did not bother reading through the messages, apparently because they were 
too many.

Ciao,
Dscho

```

## Jakub Narebski, 2006-12-06 15:36

Subject: Re: git UI nit
Message-ID: <el6nul$58n$2@sea.gmane.org>
URL: https://gitlist.dev/e/el6nul%2458n%242%40sea.gmane.org
In-Reply-To: <Pine.LNX.4.63.0612061619120.28348@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin wrote:

> On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:
> 
>> Johannes Schindelin escreveu:
>>>                     }
>>>                     if (quiet)
>>>                             continue;
>>> -                   printf("%s: needs update\n", ce->name);
>>> +                   printf("%s: dirty; needs commit\n", ce->name);
>> 
>> Yes - I'd just mention revert as an option too. 
> 
> Actually, I like it that short.

So why not simply use "%s: dirty\n"?
 
> We had an email on this list, where the poster said he could not merge 
> with Git. It turned out that the merge failed with conflicts, but he 
> did not bother reading through the messages, apparently because they were 
> too many.

Some of that stems from the "pipeline" model / implementation of git
commands, where every separate stage spews it's own warning and error
messages.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


```

## Han-Wen Nienhuys, 2006-12-06 15:41

Subject: Re: git UI nit
Message-ID: <4576E4AB.8010608@xs4all.nl>
URL: https://gitlist.dev/e/4576E4AB.8010608%40xs4all.nl
In-Reply-To: <Pine.LNX.4.63.0612061619120.28348@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin escreveu:
> Actually, I like it that short.
> 
> We had an email on this list, where the poster said he could not merge 
> with Git. It turned out that the merge failed with conflicts, but he 
> did not bother reading through the messages, apparently because they were 
> too many.

good point.


-- 

```

## Han-Wen Nienhuys, 2006-12-06 16:04

Subject: Re: git UI nit
Message-ID: <4576EA02.2010809@xs4all.nl>
URL: https://gitlist.dev/e/4576EA02.2010809%40xs4all.nl
In-Reply-To: <el6nul$58n$2@sea.gmane.org>

```
Jakub Narebski escreveu:
> Johannes Schindelin wrote:
> 
>> On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:
>>
>>> Johannes Schindelin escreveu:
>>>>                     }
>>>>                     if (quiet)
>>>>                             continue;
>>>> -                   printf("%s: needs update\n", ce->name);
>>>> +                   printf("%s: dirty; needs commit\n", ce->name);
>>> Yes - I'd just mention revert as an option too. 
>> Actually, I like it that short.
> 
> So why not simply use "%s: dirty\n"?

because a newbie doesn't know how to resolve that problem.

-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

```

## Jakub Narebski, 2006-12-06 16:23

Subject: Re: git UI nit
Message-ID: <200612061723.23515.jnareb@gmail.com>
URL: https://gitlist.dev/e/200612061723.23515.jnareb%40gmail.com
In-Reply-To: <4576EA02.2010809@xs4all.nl>

```
Han-Wen Nienhuys wrote:
> Jakub Narebski escreveu:
>> Johannes Schindelin wrote:
>> 
>>> On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:
>>>
>>>> Johannes Schindelin escreveu:
>>>>>                     }
>>>>>                     if (quiet)
>>>>>                             continue;
>>>>> -                   printf("%s: needs update\n", ce->name);
>>>>> +                   printf("%s: dirty; needs commit\n", ce->name);
>>>> Yes - I'd just mention revert as an option too. 
>>> Actually, I like it that short.
>> 
>> So why not simply use "%s: dirty\n"?
> 
> because a newbie doesn't know how to resolve that problem.

But there are [at least] two ways to resolve this:
commit or revert (reset).

-- 
Jakub Narebski

```
