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

Re: What's cooking in git.git (Jul 2016, #05; Wed, 13)

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 14, 2016, 15:45 UTC
Message-ID
<xmqqzipkrzp2.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.20.1607141505160.6426@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> +       ret = add_cache_entry(ce, options);
> +       if (refresh) {
>
> Should we really refresh, even if ret < 0?

As we stopped calling make_cache_entry() with REFRESH flag on, we can change this not to refresh if we want to, and I think we can skip refresh without compromising correctness. But I'd prefer to see that change as a separate "optimization" step---after all, the original before this change unconditionally refreshed before even calling add_cache_entry() and knowing the result of it.

Show 7 quoted lines
> +               struct cache_entry *nce;
> +
> +               nce = refresh_cache_entry(ce, CE_MATCH_REFRESH | CE_MATCH_IGNORE_MISSING);
>
> This line is overly long, but there is a *lot* of precedent for that in
> merge-recursive.c, unfortunately. So this is just a remark, not an
> objection.

Yes, I had the same objection to the original codebase while I was touching it.

Thanks.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 12 of 21 in “What's cooking in git.git (Jul 2016, #05; Wed, 13)”
  1. Junio C HamanoJul 13, 2016
  2. Stefan BellerJul 13, 2016
  3. Junio C HamanoJul 13, 2016
  4. Stefan BellerJul 13, 2016
  5. Junio C HamanoJul 13, 2016
  6. Junio C HamanoJul 13, 2016
  7. Jeff KingJul 13, 2016
  8. Duy NguyenJul 13, 2016
  9. Junio C HamanoJul 13, 2016
  10. Johannes SchindelinJul 14, 2016
  11. Johannes SchindelinJul 14, 2016
  12. Junio C HamanoJul 14, 2016
  13. Johannes SchindelinJul 14, 2016
  14. Junio C HamanoJul 14, 2016
  15. Lars SchneiderJul 16, 2016
  16. Eric WongJul 16, 2016
  17. Lars SchneiderJul 16, 2016
  18. list: avoid incompatibility with *BSD sys/queue.hEric Wong, Jul 17, 2016
  19. Eric SunshineJul 17, 2016
  20. Eric WongJul 17, 2016
  21. Lars SchneiderJul 18, 2016

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.