threads / patch / 13363

patchI 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.

Subject: [PATCH] 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.

## tl;dr

13 messages between May 3, 2008 and May 6, 2008. Diffs are folded; open one to read it.

replies: 12people: 6as markdown or json

Tim Harper· May 3, 2008, 07:08 UTC · lore
---
 read-cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to read-cache.c +1 −1
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;
 		}
-- 
1.5.5.1
Johannes Schindelin· May 3, 2008, 14:09 UTC · re: Tim Harper · lore

Re: [PATCH] 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.

Hi,
the subject is a nice joke ;-)
On Sat, 3 May 2008, Tim Harper wrote:
> -			printf("%s: needs update\n", ce->name);
> +			printf("%s: has changes\n", ce->name);
How about "local changes"?

Ciao, Dscho

Tim Harper· May 3, 2008, 16:19 UTC · re: Johannes Schindelin · lore

Re: [PATCH] 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.

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

On May 3, 2008, at 8:09 AM, Johannes Schindelin wrote:
Show 15 quoted lines
> Hi,
>
> the subject is a nice joke ;-)
>
>
> On Sat, 3 May 2008, Tim Harper wrote:
>
>> -			printf("%s: needs update\n", ce->name);
>> +			printf("%s: has changes\n", ce->name);
>
> How about "local changes"?
>
> Ciao,
> Dscho
>
Junio C Hamano· May 3, 2008, 16:57 UTC · re: Johannes Schindelin · lore

Re: [PATCH] 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.

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 6 quoted lines
> On Sat, 3 May 2008, Tim Harper wrote:
>
>> -			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"?

Tim Harper· May 3, 2008, 20:10 UTC · re: Junio C Hamano · lore

Re: [PATCH] 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.

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

Tim
On May 3, 2008, at 10:57 AM, Junio C Hamano wrote:
Show 13 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>> On Sat, 3 May 2008, Tim Harper wrote:
>>
>>> -			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"?
>
Junio C Hamano· May 4, 2008, 00:08 UTC · re: Tim Harper · lore

Re: [PATCH] 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.

Tim Harper <timcharper@gmail.com> writes:

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

Show 14 quoted lines
> On May 3, 2008, at 10:57 AM, Junio C Hamano wrote:
>
>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>>
>>> On Sat, 3 May 2008, Tim Harper wrote:
>>>
>>>> -			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"?
> 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?

Avery Pennarun· May 4, 2008, 00:21 UTC · re: Junio C Hamano · lore

Re: [PATCH] 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.

On 5/3/08, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted 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
Junio C Hamano· May 4, 2008, 01:24 UTC · re: Avery Pennarun · lore

Re: [PATCH] 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.

"Avery Pennarun" <apenwarr@gmail.com> writes:
Show 9 quoted lines
> On 5/3/08, Junio C Hamano <gitster@pobox.com> wrote:
>> > 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?

Avery Pennarun· May 5, 2008, 16:35 UTC · re: Junio C Hamano · lore

Re: [PATCH] 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.

On 5/3/08, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> "Avery Pennarun" <apenwarr@gmail.com> writes:
>  > On 5/3/08, Junio C Hamano <gitster@pobox.com> wrote:
>  >> 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
Jeff King· May 5, 2008, 17:05 UTC · re: Avery Pennarun · lore

Re: [PATCH] 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.

On Mon, May 05, 2008 at 12:35:06PM -0400, Avery Pennarun wrote:
> 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
Tim Harper· May 6, 2008, 21:50 UTC · re: Avery Pennarun · lore

Re: [PATCH] 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.

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
On May 5, 2008, at 10:35 AM, Avery Pennarun wrote:
Show 18 quoted lines
> On 5/3/08, Junio C Hamano <gitster@pobox.com> wrote:
>> "Avery Pennarun" <apenwarr@gmail.com> writes:
>>> On 5/3/08, Junio C Hamano <gitster@pobox.com> wrote:
>>>> 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
Johannes Schindelin· May 4, 2008, 09:29 UTC · re: Junio C Hamano · lore

Re: [PATCH] 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.

Hi,
On Sat, 3 May 2008, Junio C Hamano wrote:
Show 11 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > On Sat, 3 May 2008, Tim Harper wrote:
> >
> >> -			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

Matt Graham· May 3, 2008, 15:24 UTC · re: Tim Harper · lore

Re: [PATCH] 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.

On Sat, May 3, 2008 at 3:08 AM, Tim Harper <timcharper@gmail.com> wrote:
Show 19 quoted lines
> ---
>   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;
>                 }
>  --
>  1.5.5.1
Yes, "needs update" is definitely cryptic and confusing.

← back to recent threads