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

Re: [PATCH 2/2] list-objects-filter: handle unresolved sparse filter OID

From
Derrick Stolee <stolee@gmail.com>
Date
Aug 29, 2019, 14:28 UTC
Message-ID
<2ed6a754-07ef-9131-2655-6d3fd3308623@gmail.com>
In-Reply-To
<20190829134439.GA1797@sigill.intra.peff.net>
On 8/29/2019 9:44 AM, Jeff King wrote:
Show 29 quoted lines
> On Thu, Aug 29, 2019 at 09:12:38AM -0400, Derrick Stolee wrote:
> 
>>> +test_expect_success 'partial clone with unresolvable sparse filter fails cleanly' '
>>> +	test_must_fail git clone --no-local --no-checkout --filter=sparse:oid=master:sparse-filter "file://$(pwd)/sparse-src" sc1 2>err &&
>>> +	test_i18ngrep "unable to read sparse filter specification from sparse:oid=master:sparse-filter" err &&
>>> +	test_must_fail git clone --no-local --no-checkout --filter=sparse:oid=master "file://$(pwd)/sparse-src" sc2 2>err &&
>>> +	test_i18ngrep "unable to parse sparse filter data in $(git -C sparse-src rev-parse master)" err
>>
>> Just as a sanity check: when we use test_i18ngrep, how does it know how to
>> separate the part that is translated and which part is not?
>>
>> 	translated: "unable to read sparse filter specification from"
>> 	not translated: "sparse:oid=master"
> 
> It doesn't know. By default we run the suite in LOCALE=C and it checks
> the whole string. Under a GETTEXT_POISON build, it checks nothing at
> all.
> 
> The poison stuff is really about helping people not accidentally mark a
> plumbing string (that we expect to get parsed by a machine) as
> translatable. So the idea is you'd build with GETTEXT_POISON and then
> run the test suite to see if anything breaks. But that means we also
> have to annotate the test suite with "yes, I know this will be gibberish
> in a poison build, but that's OK because it's meant for humans". And
> that's what test_i18ngrep is.
> 
> test_i18ngrep could be more clever about matching the gibberish, but
> there's not much point. The LOCALE=C run already covered the correctness
> of checking the message.
Thanks for clearing this up for me!
-Stolee
Previous: Jeff KingNext: Jon Simons
Message 5 of 8 in “partial-clone: fix two issues with sparse filter handling”
  1. 0/2 partial-clone: fix two issues with sparse filter handlingJon Simons, Aug 28, 2019
  2. 2/2 list-objects-filter: handle unresolved sparse filter OIDJon Simons, Aug 28, 2019
  3. Derrick StoleeAug 29, 2019
  4. Jeff KingAug 29, 2019
  5. Derrick StoleeAug 29, 2019
  6. 1/2 list-objects-filter: only parse sparse OID when 'have_git_dir'Jon Simons, Aug 28, 2019
  7. Eric SunshineAug 28, 2019
  8. Jeff KingAug 28, 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.