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

Re: [PATCH v5 1/2] untracked-cache: test untracked-cache-bypassing behavior with -uall

From
Tao Klerks <tao@klerks.biz>
Date
Mar 30, 2022, 04:46 UTC
Message-ID
<CAPMMpoigpEi9mTET1r9sbSdw92kUXw9cRQPdUv-O179j3+_wAQ@mail.gmail.com>
In-Reply-To
<xmqq5ynwwvli.fsf@gitster.g>
On Tue, Mar 29, 2022 at 6:51 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
>
> "Tao Klerks via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > +# Bypassing the untracked cache here is not desirable, but it expected
> > +# in the current implementation
>
> If that is the case, it is much more desirable to squash it into a
> single [2/2] patch so that the desirable working is documented (so
> future breakage can be caught), the reviewers can read what the
> intended behaviour is more easily (so we do not have to be confused
> by this one saying "expect success"), make it easier to cherry-pick
> the fix and test in the same patch elsewhere, and the existing
> breakage can easily be caught by applying only the test part of the
> patch.

Sorry, I'm not completely sure whether my comment was misleading, or whether I'm misunderstanding your feedback.

The test added here does not test "desirable" behavior from an end-user functional perspective, but it does test behavior that is working "as-designed" as of many years ago.

The intent in adding this test is to ensure that if/when someone changes this behavior down the line, they be forced to understand the implications (eg: the current untracked cache structure does not store the same data for a -uall run as for a -unormal run, and so using the data from one in another would lead to output correctness errors).

Importantly, the behavior that this test is exercising *is not changed* by the 2/2 "improvement" patch; this is why I separated it out - it's a change that I feel we should make either way, and could even be its own independent patch. It's in this series as it adds relevant context and I am later adding similar tests for the new/additional behavior.

Given the (I believe) misunderstanding, a better comment would be something like:

# Bypassing the untracked cache here is not desirable from an # end-user perspective, but is expected in the current implementation. # The untracked cache data stored for a -unormal run cannot be # correctly used in a -uall run - it would yield incorrect output.

Does that make more sense?
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 22 in “Support untracked cache with '--untracked-files=all' if configured”
  1. Support untracked cache with '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Jun 23, 2021
  2. untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Feb 25, 2022
  3. Junio C HamanoFeb 25, 2022
  4. Tao KlerksFeb 27, 2022
  5. Junio C HamanoFeb 27, 2022
  6. untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Feb 27, 2022
  7. Tao KlerksFeb 27, 2022
  8. untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Feb 27, 2022
  9. Ævar Arnfjörð BjarmasonFeb 28, 2022
  10. Tao KlerksMar 2, 2022
  11. 0/2 Support untracked cache with '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Mar 29, 2022
  12. 1/2 untracked-cache: test untracked-cache-bypassing behavior with -uallTao Klerks via GitGitGadget, Mar 29, 2022
  13. Junio C HamanoMar 29, 2022
  14. Tao KlerksMar 30, 2022
  15. Junio C HamanoMar 30, 2022
  16. Tao KlerksMar 31, 2022
  17. 2/2 untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Mar 29, 2022
  18. Junio C HamanoMar 29, 2022
  19. Tao KlerksMar 30, 2022
  20. 0/2 Support untracked cache with '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Mar 31, 2022
  21. 1/2 untracked-cache: test untracked-cache-bypassing behavior with -uallTao Klerks via GitGitGadget, Mar 31, 2022
  22. 2/2 untracked-cache: support '--untracked-files=all' if configuredTao Klerks via GitGitGadget, Mar 31, 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.