git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Christopher Lindee <christopher.lindee@webpros.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] Add transport message for up-to-date references
Date: Fri, 15 Mar 2024 09:49:04 -0700	[thread overview]
Message-ID: <xmqqbk7fsanz.fsf@gitster.g> (raw)
In-Reply-To: <SA1PR14MB469129D76D1C65832FC10EA58D282@SA1PR14MB4691.namprd14.prod.outlook.com> (Christopher Lindee's message of "Fri, 15 Mar 2024 06:47:28 +0000")

Christopher Lindee <christopher.lindee@webpros.com> writes:

> It seems I just needed to look one function below to find precedent:
>
>   static int print_one_push_report(struct ref *ref, const char *dest, int count,
>                                    struct ref_push_report *report,
>                                    int porcelain, int summary_width)

It is "static int" meaning it is a file-local function.  You should
be able to find out how it is used without running around all over
the codebase but just the single file it appears in.

>   {       
>           ...
>           case REF_STATUS_UPTODATE:
>                   print_ref_status('=', "[up to date]", ref,
>                                    ref->peer_ref, NULL,
>                                    report, porcelain, summary_width);
>                   break;
>
> Is this a precedent we should follow, or is print_one_push_report()
> special in some way?

The code path this function is called is triggerd when you go
verbose:

    $ git push  ../victim-00 v2.43.0-rc0~56:master
    Everything up-to-date
    $ git push -v ../victim-00 v2.43.0-rc0~56:master
    Pushing to ../victim-00
    To ../victim-00
     = [up to date]		v2.43.0-rc0~56 -> master

Do we want to make it possible to differentiate between the forced
no-op and omitted no-op from "git push -v" output, or should users
refrain from using "-v" when they want to be able to tell?


  reply	other threads:[~2024-03-15 16:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 21:55 [PATCH 2/2] Add transport message for up-to-date references Christopher Lindee
2024-03-14  0:07 ` Junio C Hamano
2024-03-15  6:09   ` Christopher Lindee
2024-03-15  6:47     ` Christopher Lindee
2024-03-15 16:49       ` Junio C Hamano [this message]
2024-03-15 16:42     ` Junio C Hamano
2024-03-14 21:44 ` Martin Ågren
2024-03-15  3:09   ` Christopher Lindee
2024-03-15 16:54     ` Junio C Hamano

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=xmqqbk7fsanz.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christopher.lindee@webpros.com \
    --cc=git@vger.kernel.org \
    /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).