git UI nit

8 messages, 3 authors, 2016-08-11 · open the first message on its own page

git UI nit

From: Han-Wen Nienhuys <hidden>
Date: 2016-08-11 19:28:12

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

Re: git UI nit

From: Jakub Narebski <hidden>
Date: 2016-08-11 19:37:30

Johannes Schindelin wrote:
On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:
quoted
Johannes Schindelin escreveu:
quoted
                    }
                    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

Re: git UI nit

From: Han-Wen Nienhuys <hidden>
Date: 2016-08-11 19:43:28

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.


-- 

Re: git UI nit

From: Han-Wen Nienhuys <hidden>
Date: 2016-08-11 19:51:31

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. 
 

-- 

Re: git UI nit

From: Jakub Narebski <hidden>
Date: 2016-08-11 20:00:46

Han-Wen Nienhuys wrote:
Jakub Narebski escreveu:
quoted
Johannes Schindelin wrote:
quoted
On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:
quoted
Johannes Schindelin escreveu:
quoted
                    }
                    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

Re: git UI nit

From: Johannes Schindelin <hidden>
Date: 2016-08-11 20:04:58

Hi,

On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:
Johannes Schindelin escreveu:
quoted
 			}
 			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

Re: git UI nit

From: Han-Wen Nienhuys <hidden>
Date: 2016-08-11 20:19:38

Jakub Narebski escreveu:
Johannes Schindelin wrote:
quoted
On Wed, 6 Dec 2006, Han-Wen Nienhuys wrote:
quoted
Johannes Schindelin escreveu:
quoted
                    }
                    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

Re: git UI nit

From: Johannes Schindelin <hidden>
Date: 2016-08-11 20:24:11

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 <redacted>

---

 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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help