summaryrefslogtreecommitdiff
path: root/list-objects-filter.c
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2019-09-15 01:13:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-09-16 19:47:45 (GMT)
commitcf34337f9886bb45f16f0114dc8f3265aea912ce (patch)
tree9d54bfe5934ff847ec5340748ab5fd2411dea227 /list-objects-filter.c
parent4c96a775945d0299e39b982ab9cb32c5132e877d (diff)
downloadgit-cf34337f9886bb45f16f0114dc8f3265aea912ce.zip
git-cf34337f9886bb45f16f0114dc8f3265aea912ce.tar.gz
git-cf34337f9886bb45f16f0114dc8f3265aea912ce.tar.bz2
list-objects-filter: give a more specific error sparse parsing error
The sparse:oid filter has two error modes: we might fail to resolve the name to an OID, or we might fail to parse the contents of that OID. In the latter case, let's give a less generic error message, and mention the OID we did find. While we're here, let's also mark both messages as translatable. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects-filter.c')
-rw-r--r--list-objects-filter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/list-objects-filter.c b/list-objects-filter.c
index d2cdc03..50f0c6d 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -469,11 +469,12 @@ static void *filter_sparse_oid__init(
if (get_oid_with_context(the_repository,
filter_options->sparse_oid_name,
GET_OID_BLOB, &sparse_oid, &oc))
- die("unable to access sparse blob in '%s'",
+ die(_("unable to access sparse blob in '%s'"),
filter_options->sparse_oid_name);
d->omits = omitted;
if (add_excludes_from_blob_to_list(&sparse_oid, NULL, 0, &d->el) < 0)
- die("could not load filter specification");
+ die(_("unable to parse sparse filter data in %s"),
+ oid_to_hex(&sparse_oid));
ALLOC_GROW(d->array_frame, d->nr + 1, d->alloc);
d->array_frame[d->nr].defval = 0; /* default to include */