Re: [PATCH 2/2] list-objects-filter: handle unresolved sparse filter OID
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Aug 29, 2019, 13:12 UTC
- Message-ID
- <164fa8bc-bcf1-4cce-1b49-94b64535d332@gmail.com>
- In-Reply-To
- <20190828201824.1255-3-jon@jonsimons.org>
On 8/28/2019 4:18 PM, Jon Simons wrote:
Show 7 quoted lines
> Handle a potential NULL 'sparse_oid_value' when attempting to load > sparse filter exclusions by blob, to avoid segfaulting later during > 'add_excludes_from_blob_to_list'. > > While here, uniquify the errors emitted to distinguish between the > case that a given OID is NULL due to an earlier failure to resolve it, > and when an OID resolves but parsing the sparse filter spec fails.
Adding localization here also seems like a good idea. Thanks!
-Stolee
Show 5 quoted lines
> +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"
Thanks, -Stolee