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

Re: [PATCH v2] fetch: limit shared symref check only for local branches

From
Junio C Hamano <gitster@pobox.com>
Date
May 18, 2022, 15:50 UTC
Message-ID
<xmqqilq2yh49.fsf@gitster.g>
In-Reply-To
<CAGHpTBK_K+GK5z3XD-7ob7JPLrUnohfMCRVD2wrwbMhDyy3TEw@mail.gmail.com>
Orgad Shaneh <orgads@gmail.com> writes:
> This would require shuffling the code. check_not_current_branch() is
> called by do_fetch before fetch_and_consume_refs (which updates
> ref->old_oid and ref->new_oid).
Oh, that's unfortunate.

We may not be matching them with the current values of the local copies in ref_map in today's code until fetch_and_consume_refs() calls store_updated_refs() to update the .new_oid member, but I would have thought that we learned the equivalent of "git ls-remote" output a lot earlier, at least most of the time, via a call to transport_get_remote_refs(), and that was why I thought such an optimization was doable.

Thanks.  
Previous: Orgad Shaneh
Message 8 of 8 in “fetch: limit shared symref check only for local branches”
  1. fetch: limit shared symref check only for local branchesOrgad Shaneh via GitGitGadget, May 16, 2022
  2. fetch: limit shared symref check only for local branchesOrgad Shaneh via GitGitGadget, May 16, 2022
  3. Junio C HamanoMay 16, 2022
  4. Junio C HamanoMay 16, 2022
  5. Orgad ShanehMay 17, 2022
  6. Junio C HamanoMay 17, 2022
  7. Orgad ShanehMay 17, 2022
  8. Junio C HamanoMay 18, 2022

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.