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

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

From
Jon Simons <jon@jonsimons.org>
Date
Aug 30, 2019, 00:24 UTC
Message-ID
<c5ec26a3-c9a3-89ce-e83b-a7a831203770@jonsimons.org>
In-Reply-To
<CAPig+cTUEY9Z7KBqXXcvrjBzRVQJ6pJUi72BrevquN1xfvwZag@mail.gmail.com>
On 8/29/19 4:48 PM, Eric Sunshine wrote:
Show 15 quoted lines
> On Thu, Aug 29, 2019 at 7:12 PM Jon Simons <jon@jonsimons.org> wrote:
>> On 8/29/19 3:45 PM, Eric Sunshine wrote:
>>> On Thu, Aug 29, 2019 at 6:38 PM Jon Simons <jon@jonsimons.org> wrote:
>>>> +       test_write_lines /* >sparse-src/all-files &&
>>>
>>> Hmm, does this work correctly? I would expect the /* to expand to all
>>> names at the root of your filesystem, which isn't what you want. You
>>> want the literal string "/*", which means you should quote it (with
>>> double quotes inside the test body). [...]
>>
>> Oof, thanks -- yes, this is incorrect.  I will revert this back to
>> 'echo'.  I misapplied your initial suggesttion to all three lines.
> 
> Curious. Did the test still pass even with the unquoted "/*"? If so,
> does that indicate a flaw in the test or somewhere else?

Yes, the test also passes with the unquoted "/*". I think this showcases that the test really is a bare minimal sanity check that clones providing a sparse filter argument are able to run to completion. As-is the test does not further assert any behavior of the filter, just that the BUG is avoided.

-Jon
Previous: Eric SunshineNext: Jon Simons
Message 6 of 7 in “partial-clone: fix two issues with sparse filter handling”
  1. 0/2 partial-clone: fix two issues with sparse filter handlingJon Simons, Aug 29, 2019
  2. 1/2 list-objects-filter: only parse sparse OID when 'have_git_dir'Jon Simons, Aug 29, 2019
  3. Eric SunshineAug 29, 2019
  4. Jon SimonsAug 29, 2019
  5. Eric SunshineAug 29, 2019
  6. Jon SimonsAug 30, 2019
  7. 2/2 list-objects-filter: handle unresolved sparse filter OIDJon Simons, Aug 29, 2019

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.