diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-01-10 11:52:50 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-10 11:52:50 -0800 |
commit | 321f7f4fa43a0c91b1f52a2dd04872d8d970e94f (patch) | |
tree | 520132314b014548cee6cd4a2eb0af498f6d98ce /t | |
parent | Merge branch 'ws/fast-export-with-revision-options' (diff) | |
parent | test-ref-store: print hash algorithm (diff) | |
download | tgif-321f7f4fa43a0c91b1f52a2dd04872d8d970e94f.tar.xz |
Merge branch 'hn/test-ref-store-show-hash-algo'
Debugging support for refs API.
* hn/test-ref-store-show-hash-algo:
test-ref-store: print hash algorithm
Diffstat (limited to 't')
-rw-r--r-- | t/helper/test-ref-store.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c index 24dd4bec08..3e4ddaee70 100644 --- a/t/helper/test-ref-store.c +++ b/t/helper/test-ref-store.c @@ -269,7 +269,7 @@ static int cmd_delete_ref(struct ref_store *refs, const char **argv) struct object_id old_oid; if (get_oid_hex(sha1_buf, &old_oid)) - die("not sha-1"); + die("cannot parse %s as %s", sha1_buf, the_hash_algo->name); return refs_delete_ref(refs, msg, refname, &old_oid, flags); } @@ -284,9 +284,10 @@ static int cmd_update_ref(struct ref_store *refs, const char **argv) struct object_id old_oid; struct object_id new_oid; - if (get_oid_hex(old_sha1_buf, &old_oid) || - get_oid_hex(new_sha1_buf, &new_oid)) - die("not sha-1"); + if (get_oid_hex(old_sha1_buf, &old_oid)) + die("cannot parse %s as %s", old_sha1_buf, the_hash_algo->name); + if (get_oid_hex(new_sha1_buf, &new_oid)) + die("cannot parse %s as %s", new_sha1_buf, the_hash_algo->name); return refs_update_ref(refs, msg, refname, &new_oid, &old_oid, |