git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 -> 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?

Previous: Christopher LindeeNext: Junio C Hamano
Message 5 of 9 in “Add transport message for up-to-date references”
  1. 2/2 Add transport message for up-to-date referencesChristopher Lindee, Mar 12, 2024
  2. Junio C HamanoMar 14, 2024
  3. Christopher LindeeMar 15, 2024
  4. Christopher LindeeMar 15, 2024
  5. Junio C HamanoMar 15, 2024
  6. Junio C HamanoMar 15, 2024
  7. Martin ÅgrenMar 14, 2024
  8. Christopher LindeeMar 15, 2024
  9. Junio C HamanoMar 15, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.