@@ -1749,8 +1749,8 @@ static int get_object(struct ref_array_item *ref, int deref, struct object **obj
}
if (oid_object_info_extended(the_repository, &oi->oid, &oi->info,
OBJECT_INFO_LOOKUP_REPLACE))
- return strbuf_addf_ret(err, -1, _("missing object %s for %s"),
- oid_to_hex(&oi->oid), ref->refname);
+ return strbuf_addf_ret(err, 1, _("%s missing"),
+ oid_to_hex(&oi->oid));
if (oi->info.disk_sizep && oi->disk_size < 0)
BUG("Object size is less than zero.");
@@ -41,7 +41,7 @@ test_expect_success 'Missing objects are reported correctly' '
r=refs/heads/missing &&
echo $MISSING >.git/$r &&
test_when_finished "rm -f .git/$r" &&
- echo "fatal: missing object $MISSING for $r" >missing-err &&
+ echo "fatal: $MISSING missing" >missing-err &&
test_must_fail git for-each-ref 2>err &&
test_cmp missing-err err &&
(