Re: [PATCH 2/2] Add transport message for up-to-date references
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 15, 2024, 16:49 UTC
- Message-ID
- <xmqqbk7fsanz.fsf@gitster.g>
- In-Reply-To
- <SA1PR14MB469129D76D1C65832FC10EA58D282@SA1PR14MB4691.namprd14.prod.outlook.com>
Christopher Lindee <christopher.lindee@webpros.com> writes:
Show 5 quoted lines
> 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.
Show 10 quoted lines
> {
> ...
> 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 -> masterDo 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?