Re: patch: change “Everything up-to-date” to “Already up to date.” (No-op messages for git-push and git-pull)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 29 2021, Eric Sunshine wrote:

> On Mon, Nov 29, 2021 at 7:04 PM Anselm Schüler <mail@xxxxxxxxxxxxxxxxxx> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux