fetch: die on invalid --negotiation-tip hash
commit82823118b9cd397d6b626cc86a0e555069ea8253
authorJonathan Tan <jonathantanmy@google.com>
Thu, 15 Jul 2021 17:44:32 +0000 (15 10:44 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jul 2021 18:58:52 +0000 (15 11:58 -0700)
treeb2fef9aff85748958c92be3a5479ba86a7b0da3c
parent54a03bc7d9a7f264d511d88166afe8da7f75e90a
fetch: die on invalid --negotiation-tip hash

If a full hexadecimal hash is given as a --negotiation-tip to "git
fetch", and that hash does not correspond to an object, "git fetch" will
segfault if --negotiate-only is given and will silently ignore that hash
otherwise. Make these cases fatal errors, just like the case when an
invalid ref name or abbreviated hash is given.

While at it, mark the error messages as translatable.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
t/t5510-fetch.sh