git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] transport, send-pack: append period to up-to-date message
@ 2016-05-24 20:51 Yong Bakos
  2016-05-24 21:21 ` Stefan Beller
  0 siblings, 1 reply; 5+ messages in thread
From: Yong Bakos @ 2016-05-24 20:51 UTC (permalink / raw)
  To: git; +Cc: Yong Bakos, barkalow, Yong Bakos

Appending a period to "Everything up-to-date" makes the output message
consistent with similar output in builtin/merge.c.

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
---
 builtin/send-pack.c | 2 +-
 transport.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 1ff5a67..67d9304 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -294,7 +294,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix)
 	}

 	if (!ret && !transport_refs_pushed(remote_refs))
-		fprintf(stderr, "Everything up-to-date\n");
+		fprintf(stderr, "Everything up-to-date.\n");

 	return ret;
 }
diff --git a/transport.c b/transport.c
index 095e61f..53d5405 100644
--- a/transport.c
+++ b/transport.c
@@ -942,7 +942,7 @@ int transport_push(struct transport *transport,
 		if (porcelain && !push_ret)
 			puts("Done");
 		else if (!quiet && !ret && !transport_refs_pushed(remote_refs))
-			fprintf(stderr, "Everything up-to-date\n");
+			fprintf(stderr, "Everything up-to-date.\n");

 		return ret;
 	}
--
2.7.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] transport, send-pack: append period to up-to-date message
  2016-05-24 20:51 [PATCH] transport, send-pack: append period to up-to-date message Yong Bakos
@ 2016-05-24 21:21 ` Stefan Beller
  2016-05-25 22:47   ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Beller @ 2016-05-24 21:21 UTC (permalink / raw)
  To: Yong Bakos; +Cc: git@vger.kernel.org, barkalow, Yong Bakos

On Tue, May 24, 2016 at 1:51 PM, Yong Bakos <junk@humanoriented.com> wrote:
> Appending a period to "Everything up-to-date" makes the output message
> consistent with similar output in builtin/merge.c.
>
> Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
> ---
>  builtin/send-pack.c | 2 +-
>  transport.c         | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/send-pack.c b/builtin/send-pack.c
> index 1ff5a67..67d9304 100644
> --- a/builtin/send-pack.c
> +++ b/builtin/send-pack.c

While consistency is a good idea in general, I wonder how that applies here.
git-send-pack is a low level (i.e. plumbing) command.

       The interface (input, output, set of options and the semantics) to
       these low-level commands are meant to be a lot more stable than
       Porcelain level commands, because these commands are primarily for
       scripted use. The interface to Porcelain commands on the other hand are
       subject to change in order to improve the end user experience.

So if another porcelain exists and compares the output string
exactly, this would be a regression for them. That is why I'd refrain
from updating these strings

However these two strings are only showing up in these 2 places, so
maybe instead
we'd want to see a test documenting existing behavior?

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] transport, send-pack: append period to up-to-date message
  2016-05-24 21:21 ` Stefan Beller
@ 2016-05-25 22:47   ` Jeff King
  2016-05-25 22:55     ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2016-05-25 22:47 UTC (permalink / raw)
  To: Stefan Beller; +Cc: Yong Bakos, git@vger.kernel.org, barkalow, Yong Bakos

On Tue, May 24, 2016 at 02:21:00PM -0700, Stefan Beller wrote:

> On Tue, May 24, 2016 at 1:51 PM, Yong Bakos <junk@humanoriented.com> wrote:
> > Appending a period to "Everything up-to-date" makes the output message
> > consistent with similar output in builtin/merge.c.
> >
> > Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
> > ---
> >  builtin/send-pack.c | 2 +-
> >  transport.c         | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/builtin/send-pack.c b/builtin/send-pack.c
> > index 1ff5a67..67d9304 100644
> > --- a/builtin/send-pack.c
> > +++ b/builtin/send-pack.c
> 
> While consistency is a good idea in general, I wonder how that applies here.
> git-send-pack is a low level (i.e. plumbing) command.
> 
>        The interface (input, output, set of options and the semantics) to
>        these low-level commands are meant to be a lot more stable than
>        Porcelain level commands, because these commands are primarily for
>        scripted use. The interface to Porcelain commands on the other hand are
>        subject to change in order to improve the end user experience.
> 
> So if another porcelain exists and compares the output string
> exactly, this would be a regression for them. That is why I'd refrain
> from updating these strings

I think messages to stderr are generally fair game for changing, even in
plumbing. In many cases they are also translated (and I would argue that
these messages probably should be translated, too).

That being said, CodingGuidelines says:

   - Do not end error messages with a full stop.

This isn't an error message exactly, but I think it's in the same vein.
I will note that we have not historically been consistent here, though
(as evidenced by the noted message in git-merge).

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] transport, send-pack: append period to up-to-date message
  2016-05-25 22:47   ` Jeff King
@ 2016-05-25 22:55     ` Junio C Hamano
  2016-05-26 14:16       ` Yong Bakos
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2016-05-25 22:55 UTC (permalink / raw)
  To: Jeff King
  Cc: Stefan Beller, Yong Bakos, git@vger.kernel.org, barkalow,
	Yong Bakos

Jeff King <peff@peff.net> writes:

> I think messages to stderr are generally fair game for changing, even in
> plumbing. In many cases they are also translated (and I would argue that
> these messages probably should be translated, too).

I think I agree.  My first reaction to this thread indeed was "Why
isn't this marked for translation?"; as to the change proposed by
the patch itself, my reaction actually was "Meh" ;-)

> That being said, CodingGuidelines says:
>
>    - Do not end error messages with a full stop.

Thanks for pointing it out---I forgot about that one.

I do not think there was a concrete reason why they should not end
with a full stop, other than "be consistent with existing ones that
do not end with a full stop", though.

> This isn't an error message exactly, but I think it's in the same vein.
> I will note that we have not historically been consistent here, though
> (as evidenced by the noted message in git-merge).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] transport, send-pack: append period to up-to-date message
  2016-05-25 22:55     ` Junio C Hamano
@ 2016-05-26 14:16       ` Yong Bakos
  0 siblings, 0 replies; 5+ messages in thread
From: Yong Bakos @ 2016-05-26 14:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jeff King, Stefan Beller, git@vger.kernel.org, barkalow

On May 25, 2016, at 5:55 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 
> Jeff King <peff@peff.net> writes:
> 
>> I think messages to stderr are generally fair game for changing, even in
>> plumbing. In many cases they are also translated (and I would argue that
>> these messages probably should be translated, too).
> 
> I think I agree.  My first reaction to this thread indeed was "Why
> isn't this marked for translation?"; as to the change proposed by
> the patch itself, my reaction actually was "Meh" ;-)

Aw come one, Junio, you mean one "." doesn't excite you? :)

> 
>> That being said, CodingGuidelines says:
>> 
>>   - Do not end error messages with a full stop.
> 
> Thanks for pointing it out---I forgot about that one.
> 
> I do not think there was a concrete reason why they should not end
> with a full stop, other than "be consistent with existing ones that
> do not end with a full stop", though.
> 
>> This isn't an error message exactly, but I think it's in the same vein.
>> I will note that we have not historically been consistent here, though
>> (as evidenced by the noted message in git-merge).

Indeed, most of the output during a pull/merge/push workflow breaks the
"don't end with a full stop" guideline. I believe that this patch,
despite its candidacy for the "most insignificant patch award," is a
sane one.

Thanks for reviewing,
yong

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-26 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 20:51 [PATCH] transport, send-pack: append period to up-to-date message Yong Bakos
2016-05-24 21:21 ` Stefan Beller
2016-05-25 22:47   ` Jeff King
2016-05-25 22:55     ` Junio C Hamano
2016-05-26 14:16       ` Yong Bakos

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).