git/refs
Karthik Nayak aa6e99f122 refs: specify error for regular refs with old_target
When a reference update tries to update a symref, but the ref in
question is actually a regular ref, we raise an error. However the error
raised in this situation is:

  verifying symref target: '<ref>': reference is missing but expected <old-target>

which is very generic and doesn't indicate the mismatch of types. Let's
make this error more specific:

  cannot lock ref '<ref>': expected symref with target '<old-target>': but is a regular ref

so that users have a clearer understanding.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-06-07 10:25:44 -07:00
..
debug.c refs: remove create_symref and associated dead code 2024-05-07 08:51:50 -07:00
files-backend.c refs: specify error for regular refs with old_target 2024-06-07 10:25:44 -07:00
iterator.c refs: always treat iterators as ordered 2024-02-21 09:58:06 -08:00
packed-backend.c refs: remove create_symref and associated dead code 2024-05-07 08:51:50 -07:00
packed-backend.h Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'" 2022-04-13 15:51:33 -07:00
ref-cache.c refs: always treat iterators as ordered 2024-02-21 09:58:06 -08:00
ref-cache.h hash-ll.h: split out of hash.h to remove dependency on repository.h 2023-04-24 12:47:32 -07:00
refs-internal.h refs: create and use ref_update_expects_existing_old_ref() 2024-06-07 10:25:44 -07:00
reftable-backend.c refs: specify error for regular refs with old_target 2024-06-07 10:25:44 -07:00