From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric Sunshine <sunshine@sunshineco.com>,
Benji Kay via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Benji Kay <okaybenji@gmail.com>
Subject: Re: [PATCH] push: improve consistency of output when "up to date"
Date: Mon, 15 Jan 2024 09:43:13 +0100 [thread overview]
Message-ID: <ZaTwIUBKNhuAmrLX@tanuki> (raw)
In-Reply-To: <xmqqjzofec0e.fsf@gitster.g>
[-- Attachment #1: Type: text/plain, Size: 2334 bytes --]
On Thu, Jan 11, 2024 at 02:33:21PM -0800, Junio C Hamano wrote:
> Eric Sunshine <sunshine@sunshineco.com> writes:
>
> > Thanks. This particular change is proposed periodically...
> >
> >> diff --git a/transport.c b/transport.c
> >> @@ -1467,7 +1467,7 @@ int transport_push(struct repository *r,
> >> else if (!quiet && !ret && !transport_refs_pushed(remote_refs))
> >> - fprintf(stderr, "Everything up-to-date\n");
> >> + fprintf(stderr, "Everything up to date.\n");
> >
> > ... but has not been considered desirable.
> >
> > See, for instance, this email thread explaining the rationale for
> > avoiding such a change:
> > https://lore.kernel.org/git/pull.1298.git.1658908927714.gitgitgadget@gmail.com/T/
>
> Looking at the "grep" hits:
>
> $ git grep -e 'up-to-date.*"' \*.c
> builtin/rm.c: OPT__FORCE(&force, N_("override the up-to-date check"), PARSE_OPT_NOCOMPLETE),
> builtin/send-pack.c: fprintf(stderr, "Everything up-to-date\n");
> http-push.c: fprintf(stderr, "'%s': up-to-date\n", ref->name);
> http-push.c: "Maybe you are not up-to-date and "
> transport.c: fprintf(stderr, "Everything up-to-date\n");
>
> it is true that these are not marked for translation, which should
> be a clue enough that we want them to be exactly the way they are
> spelled. However, they are going to the standard error stream. Is
> it reasonable to expect third-party tools scraping it to find the
> string "up-to-date"?
I would say it's not entirely reasonable:
- These are strings that users see frequently, and if they are not
proficient in the English language I think it actually regresses
their user experience.
- The way this string is written would never lead me, as a script
developer, to think that this is a message that should be parsed by
my script. It's simply too user-focussed to make me think so.
- Last but not least, I think it's not entirely unreasonable to ask
script developers to use e.g. LANG=C when they expect strings to be
stable.
Also, with the introduction of `git push --porcelain`, I think there is
even less reason to keep such user-visible strings intact. Any machine
that wants to parse output of git-push(1) should use `--porcelain`
instead in my opinion.
Patrick
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-01-15 8:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 21:27 [PATCH] push: improve consistency of output when "up to date" Benji Kay via GitGitGadget
2024-01-11 21:43 ` Eric Sunshine
2024-01-11 22:33 ` Junio C Hamano
[not found] ` <CADavbxcFXpP5EQZ=UEMZt+6KKVtCsTMbgQDHEo0uinm0YfRbZA@mail.gmail.com>
2024-01-12 0:55 ` Benji Kay
2024-01-12 3:14 ` Eric Sunshine
2024-01-12 17:19 ` [PATCH] messages: mark some strings with "up-to-date" not to touch Eric Sunshine
2024-01-12 18:19 ` Junio C Hamano
2024-01-15 8:43 ` Patrick Steinhardt [this message]
2024-01-11 21:43 ` [PATCH] push: improve consistency of output when "up to date" Taylor Blau
2024-01-11 21:45 ` Eric Sunshine
2024-01-17 22:02 ` Dragan Simic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZaTwIUBKNhuAmrLX@tanuki \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=okaybenji@gmail.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).