Skip to contentSkip to conversation

I don't known anyone who understands what it means when they do a merge and see "file.txt: needs update". "file.txt: has changes" is much clearer.

PATCH In review Tim Harper 6 participants 13 messages Jun 15, 2016

lore
Share & tools
lore

Tim Harper

author
#0 lore raw

PATCH 1/1 I don't known anyone who understands what it means when they do a merge and see "file.txt: needs update". "file.txt: has changes" is much clearer.

---
 read-cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
read-cache.c +1 -1
index a92b25b..971667d 100644
@@ -999,7 +999,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p
 			}
 			if (quiet)
 				continue;
-			printf("%s: needs update\n", ce->name);
+			printf("%s: has changes\n", ce->name);
 			has_errors = 1;
 			continue;
 		}
Signature · 1 line
1.5.5.1
#1 lore raw
Quoted 17 lines · Tim Harper
---
  read-cache.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/read-cache.c b/read-cache.c
index a92b25b..971667d 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -999,7 +999,7 @@ int refresh_index(struct index_state *istate, unsigned int flags, const char **p

                        }
                        if (quiet)
                                continue;
 -                       printf("%s: needs update\n", ce->name);
 +                       printf("%s: has changes\n", ce->name);
                        has_errors = 1;
                        continue;
                }
Quoted 2 lines

--
1.5.5.1

Yes, "needs update" is definitely cryptic and confusing.

#2 lore raw
In reply to Tim Harper

Hi,

the subject is a nice joke ;-)

read-cache.c int refresh_index(struct index_state *istate, unsigned int flags, const char **p · line 1002

Quoted 2 lines · Tim Harper
read-cache.c +1 -1
-			printf("%s: needs update\n", ce->name);
+			printf("%s: has changes\n", ce->name);

How about "local changes"?

Ciao,
Dscho

#3 lore raw
Quoted 6 lines · Johannes Schindelin

read-cache.c int refresh_index(struct index_state *istate, unsigned int flags, const char **p · line 1002

Quoted 2 lines · Tim Harper
read-cache.c +1 -1
-			printf("%s: needs update\n", ce->name);
+			printf("%s: has changes\n", ce->name);

How about "local changes"?

Aren't there Porcelain and end-user scripts that relies on the output by doing "sed -ne s'/: needs update$//p"?

author
#4 lore raw

I ran all of the tests with the patch apply, and they all pass. Is that enough indication?

Tim

Quoted 12 lines · Junio C Hamano
Quoted 6 lines · Johannes Schindelin

read-cache.c int refresh_index(struct index_state *istate, unsigned int flags, const char **p · line 1002

Quoted 2 lines · Tim Harper
read-cache.c +1 -1
-			printf("%s: needs update\n", ce->name);
+			printf("%s: has changes\n", ce->name);

How about "local changes"?

Aren't there Porcelain and end-user scripts that relies on the output by doing "sed -ne s'/: needs update$//p"?

#5 lore raw

Tim Harper <[email protected]> writes:

because it is very hard to follow the flow of thought. Please do not top post.

Quoted 11 lines · Junio C Hamano
Quoted 10 lines
Quoted 6 lines · Johannes Schindelin

read-cache.c int refresh_index(struct index_state *istate, unsigned int flags, const char **p · line 1002

Quoted 2 lines · Tim Harper
read-cache.c +1 -1
-			printf("%s: needs update\n", ce->name);
+			printf("%s: has changes\n", ce->name);

How about "local changes"?

Quoted 6 lines
Quoted 3 lines

Aren't there Porcelain and end-user scripts that relies on the output by
doing "sed -ne s'/: needs update$//p"?

I ran all of the tests with the patch apply, and they all pass. Is that enough indication?

Of course not. Where does end-user scripts come into play when you are running the testsuite?

#6 lore raw
Quoted 5 lines · Junio C Hamano
Quoted 2 lines

I ran all of the tests with the patch apply, and they all pass. Is that enough indication?

Of course not. Where does end-user scripts come into play when you are
running the testsuite?

I thought user scripts weren't supposed to rely on the porcelain output? It seems to change rather frequently anyway.

Avery

#7 lore raw
Quoted 9 lines · Avery Pennarun
Quoted 5 lines · Junio C Hamano
Quoted 2 lines

I ran all of the tests with the patch apply, and they all pass. Is that enough indication?

Of course not. Where does end-user scripts come into play when you are
running the testsuite?

I thought user scripts weren't supposed to rely on the porcelain output? It seems to change rather frequently anyway.

Wasn't the patch about changing output from "update-index --refresh", which is as low as you can get?

#8 lore raw
Quoted 10 lines · Junio C Hamano
Quoted 6 lines · Avery Pennarun
Quoted 2 lines · Junio C Hamano

Of course not. Where does end-user scripts come into play when you are
running the testsuite?

I thought user scripts weren't supposed to rely on the porcelain output? It seems to change rather frequently anyway.

Wasn't the patch about changing output from "update-index --refresh",
which is as low as you can get?

Hmm, perhaps the problem then is that we're using plumbing output and presenting it to the user as part of the porcelain. Is there an elegant way to fix that?

Avery

#9 lore raw
Quoted 3 lines · Avery Pennarun

Hmm, perhaps the problem then is that we're using plumbing output and presenting it to the user as part of the porcelain. Is there an elegant way to fix that?

2>&1 | sed 's/needs update/has local changes/' ?

Oh wait, you said elegant...

-Peff

author
#10 lore raw
In reply to Avery Pennarun

Yeah: I was thinking about it earlier and came at the same conclusion.

There's a "porcelain" interface for a lot of commands. Does the concept need to be furthered for this case?

On another note - I've been running with this change for several days, and everything seems to be alright.

Tim

Quoted 17 lines · Avery Pennarun
Quoted 10 lines · Junio C Hamano
Quoted 6 lines · Avery Pennarun
Quoted 2 lines · Junio C Hamano

Of course not. Where does end-user scripts come into play when you are running the testsuite?

I thought user scripts weren't supposed to rely on the porcelain output? It seems to change rather frequently anyway.

Wasn't the patch about changing output from "update-index --refresh", which is as low as you can get?

Hmm, perhaps the problem then is that we're using plumbing output and presenting it to the user as part of the porcelain. Is there an elegant way to fix that?

Avery

#11 lore raw
In reply to Junio C Hamano

Hi,

Quoted 11 lines · Junio C Hamano
Quoted 6 lines · Johannes Schindelin

read-cache.c int refresh_index(struct index_state *istate, unsigned int flags, const char **p · line 1002

Quoted 2 lines · Tim Harper
read-cache.c +1 -1
-			printf("%s: needs update\n", ce->name);
+			printf("%s: has changes\n", ce->name);

How about "local changes"?

Aren't there Porcelain and end-user scripts that relies on the output by doing "sed -ne s'/: needs update$//p"?

Potentially. But I thought that it would make more sense to use --name-only in that case.

However, I obviously like that you go out of your way to cause the least damage to current users, so how about something like in merge-recursive, where you can change some output based on an environment variable?

In this case, I'd rather make it an option, but that may be overkill. But then, enough people have commented that this message is irritating them.

Ciao,
Dscho

author
#12 lore raw
In reply to Johannes Schindelin

heh heh - yeah, I used git to send the email and it just sent that huge honkin line.

I like "local changes".

There's a bunch of lines that say "not uptodate". I'll look for them all and resend the patch.

Thanks,
Tim

Quoted 15 lines · Johannes Schindelin

Hi,

the subject is a nice joke ;-)

read-cache.c int refresh_index(struct index_state *istate, unsigned int flags, const char **p · line 1002

Quoted 2 lines · Tim Harper
read-cache.c +1 -1
-			printf("%s: needs update\n", ce->name);
+			printf("%s: has changes\n", ce->name);

How about "local changes"?

Ciao,
Dscho