git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* patch: change “Everything up-to-date” to “Already up to date.” (No-op messages for git-push and git-pull)
@ 2021-11-30  0:04 Anselm Schüler
  2021-11-30  0:19 ` Eric Sunshine
  0 siblings, 1 reply; 4+ messages in thread
From: Anselm Schüler @ 2021-11-30  0:04 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 981 bytes --]

Why are the no-op messages for git-push and git-pull (i.e. when remote 
and local are identical) so different, while describing something very 
similar? IMO the messages should be either identical or very similar.
git-pull results in “Already up to date.”, while git-push results 
in “Everything up-to-date”.
Note the difference in the usage of “Already” vs. “Everything”, 
dashes vs. spcaes, and a period vs. no period. While I understand that 
these aren’t saying the same thing and therefore some difference is 
warranted, might I suggest that this difference be limited to the words 
“Already” and “Everything”?

I have attached a patch—I hope this is a correct way of doing this.

It should be considered that other messages reading “Already up to 
date.” seem to use a translation system, it might be better to use 
that system here, too. Unfortunately, I don’t know how to do that 
(currently). At any rate, this patch could serve as a temporary 
“fix”.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Change-Everything-up-to-date-to-Already-up-to-date-f.patch --]
[-- Type: text/x-patch, Size: 1434 bytes --]

From 01d2df17c0055120f5e16f105effdeeb5d288566 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Anselm=20Sch=C3=BCler?= <mail@anselmschueler.com>
Date: Mon, 29 Nov 2021 00:42:37 +0100
Subject: [PATCH] =?UTF-8?q?Change=20=E2=80=9CEverything=20up-to-date?=
 =?UTF-8?q?=E2=80=9D=20to=20=E2=80=9CAlready=20up=20to=20date=E2=80=9D=20f?=
 =?UTF-8?q?or=20more=20consistency?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Anselm Schüler <mail@anselmschueler.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 69c432ef1a..ad90fb0370 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -338,7 +338,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, "Already up to date.\n");
 
 	return ret;
 }
diff --git a/transport.c b/transport.c
index e4f1decae2..1e224794cc 100644
--- a/transport.c
+++ b/transport.c
@@ -1401,7 +1401,7 @@ int transport_push(struct repository *r,
 		if (porcelain && !push_ret)
 			puts("Done");
 		else if (!quiet && !ret && !transport_refs_pushed(remote_refs))
-			fprintf(stderr, "Everything up-to-date\n");
+			fprintf(stderr, "Already up to date.\n");
 
 		return ret;
 	}
-- 
2.33.1


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

* Re: patch: change “Everything up-to-date” to “Already up to date.” (No-op messages for git-push and git-pull)
  2021-11-30  0:04 patch: change “Everything up-to-date” to “Already up to date.” (No-op messages for git-push and git-pull) Anselm Schüler
@ 2021-11-30  0:19 ` Eric Sunshine
  2021-11-30 13:55   ` Ævar Arnfjörð Bjarmason
  2021-12-03 22:15   ` Johannes Schindelin
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Sunshine @ 2021-11-30  0:19 UTC (permalink / raw)
  To: Anselm Schüler; +Cc: git

On Mon, Nov 29, 2021 at 7:04 PM Anselm Schüler <mail@anselmschueler.com> wrote:
> Why are the no-op messages for git-push and git-pull (i.e. when remote
> and local are identical) so different, while describing something very
> similar? IMO the messages should be either identical or very similar.
> git-pull results in “Already up to date.”, while git-push results
> in “Everything up-to-date”.
>
> It should be considered that other messages reading “Already up to
> date.” seem to use a translation system, it might be better to use
> that system here, too. Unfortunately, I don’t know how to do that
> (currently). At any rate, this patch could serve as a temporary
> “fix”.

This question/issue is raised from time to time, and the short answer
is that send-pack is plumbing, thus there likely will be resistance to
an arbitrary change of text. Denton goes into a bit more detail in his
reply[1].

[1]: https://lore.kernel.org/git/20191122180433.GA57478@generichostname/

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

* Re: patch: change “Everything up-to-date” to “Already up to date.” (No-op messages for git-push and git-pull)
  2021-11-30  0:19 ` Eric Sunshine
@ 2021-11-30 13:55   ` Ævar Arnfjörð Bjarmason
  2021-12-03 22:15   ` Johannes Schindelin
  1 sibling, 0 replies; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-11-30 13:55 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Anselm Schüler, git


On Mon, Nov 29 2021, Eric Sunshine wrote:

> On Mon, Nov 29, 2021 at 7:04 PM Anselm Schüler <mail@anselmschueler.com> wrote:
>> Why are the no-op messages for git-push and git-pull (i.e. when remote
>> and local are identical) so different, while describing something very
>> similar? IMO the messages should be either identical or very similar.
>> git-pull results in “Already up to date.”, while git-push results
>> in “Everything up-to-date”.
>>
>> It should be considered that other messages reading “Already up to
>> date.” seem to use a translation system, it might be better to use
>> that system here, too. Unfortunately, I don’t know how to do that
>> (currently). At any rate, this patch could serve as a temporary
>> “fix”.
>
> This question/issue is raised from time to time, and the short answer
> is that send-pack is plumbing, thus there likely will be resistance to
> an arbitrary change of text. Denton goes into a bit more detail in his
> reply[1].
>
> [1]: https://lore.kernel.org/git/20191122180433.GA57478@generichostname/

Yes, but this isn't really applicable to what Anselm really wants to
change.

Here, i.e. yes the builtin/send-pack.c part of his patch mayb e suspect,
but we can simply skiip that and change the transport.c part, it's API
that only builtin/push.c uses.

Currently transport_push() returns -1 or 0. I think the best change
there would be to chang it and its callers to return an enum, so we
could have it indicate whether it pushed anything or not.

Probably even better would be to make it stop printing output entirely,
and to merely have the "struct ref *" of remote refs returned to the
caller. Then the caller could do the equivalent of
transport_refs_pushed() itself.

I.e. we might want to print these in various mixtures of these
scenarios:

    Already up-to-date
    Pushed all requested refs
    Pushed X/Y refs, Y-X were already up-to-date

Anselm: If you're interested in following-up please read
Documentation/SubmittingPatches, i.e. send your patch with
git-send-email or another method that doesn't send the patch as an
attachment.

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

* Re: patch: change “Everything up-to-date” to “Already up to date.” (No-op messages for git-push and git-pull)
  2021-11-30  0:19 ` Eric Sunshine
  2021-11-30 13:55   ` Ævar Arnfjörð Bjarmason
@ 2021-12-03 22:15   ` Johannes Schindelin
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2021-12-03 22:15 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Anselm Schüler, git

[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]

Hi,

On Mon, 29 Nov 2021, Eric Sunshine wrote:

> On Mon, Nov 29, 2021 at 7:04 PM Anselm Schüler <mail@anselmschueler.com> wrote:
> > Why are the no-op messages for git-push and git-pull (i.e. when remote
> > and local are identical) so different, while describing something very
> > similar? IMO the messages should be either identical or very similar.
> > git-pull results in “Already up to date.”, while git-push results
> > in “Everything up-to-date”.
> >
> > It should be considered that other messages reading “Already up to
> > date.” seem to use a translation system, it might be better to use
> > that system here, too. Unfortunately, I don’t know how to do that
> > (currently). At any rate, this patch could serve as a temporary
> > “fix”.
>
> This question/issue is raised from time to time, and the short answer
> is that send-pack is plumbing, thus there likely will be resistance to
> an arbitrary change of text. Denton goes into a bit more detail in his
> reply[1].
>
> [1]: https://lore.kernel.org/git/20191122180433.GA57478@generichostname/

As an additional data point: changing the `git pull` message (actually,
the message comes from `merge-recursive.c`, I believe) from "up-to-date"
to "up to date" in 7560f547e61 (treewide: correct several "up-to-date" to
"up to date", 2017-08-23) broke applications parsing that message (IIRC
Visual Studio was one of those who had to scramble to adjust their code
accordingly).

So yes, we are pretty reluctant to change such central messages.
Sometimes, correct grammar ain't worth the cost it incurs.

Ciao,
Johannes

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

end of thread, other threads:[~2021-12-03 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30  0:04 patch: change “Everything up-to-date” to “Already up to date.” (No-op messages for git-push and git-pull) Anselm Schüler
2021-11-30  0:19 ` Eric Sunshine
2021-11-30 13:55   ` Ævar Arnfjörð Bjarmason
2021-12-03 22:15   ` Johannes Schindelin

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