summaryrefslogtreecommitdiff
path: root/builtin/count-objects.c
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2025-04-08 10:51:05 +0200
committerJunio C Hamano <gitster@pobox.com>2025-04-08 07:57:18 -0700
commit05a1834e429c619602a8507d8a2c9b81d467c24d (patch)
tree41eee26d3275cd36a9bed4ec068ac745820fe6c0 /builtin/count-objects.c
parent7c42ab2c92a54adf0573de36ea29e5bcb819c7da (diff)
refs/files: remove redundant check in split_symref_update()
In `split_symref_update()`, there were two checks for duplicate refnames: - At the start, `string_list_has_string()` ensures the refname is not already in `affected_refnames`, preventing duplicates from being added. - After adding the refname, another check verifies whether the newly inserted item has a `util` value. The second check is unnecessary because the first one guarantees that `string_list_insert()` will never encounter a preexisting entry. The `item->util` field is assigned to validate that a rename doesn't already exist in the list. The validation is done after the first check. As this check is removed, clean up the validation and the assignment of this field in `split_head_update()` and `files_transaction_prepare()`. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Acked-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/count-objects.c')
0 files changed, 0 insertions, 0 deletions