refs/files: remove unused "skip" in lock_raw_ref() too

Remove the unused "skip" parameter to lock_raw_ref(), it was never used. We do use it when passing "skip" to the refs_rename_ref_available() function in files_copy_or_rename_ref(), but not here. This is part of a larger series that modifies lock_ref_oid_basic() extensively, there will be no more modifications of this function in this series, but since the preceding commit removed this unused parameter from lock_ref_oid_basic(), let's do it here too for consistency. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Aug 23, 2021 at 13:36 UTC 640d9d55c3fd73a103165b6457fb7c50ba9e829e
1 file changed +4 -5
refs/files-backend.c
+4 -5
@@ -531,7 +531,6 @@ static void unlock_ref(struct ref_lock *lock)
531 static int lock_raw_ref(struct files_ref_store *refs,
532 const char *refname, int mustexist,
533 const struct string_list *extras,
534 - const struct string_list *skip,
534 struct ref_lock **lock_p,
535 struct strbuf *referent,
536 unsigned int *type,
@@ -568,7 +567,7 @@ retry:
567 * reason to expect this error to be transitory.
568 */
569 if (refs_verify_refname_available(&refs->base, refname,
571 - extras, skip, err)) {
570 + extras, NULL, err)) {
571 if (mustexist) {
572 /*
573 * To the user the relevant error is
@@ -673,7 +672,7 @@ retry:
672 REMOVE_DIR_EMPTY_ONLY)) {
673 if (refs_verify_refname_available(
674 &refs->base, refname,
676 - extras, skip, err)) {
675 + extras, NULL, err)) {
676 /*
677 * The error message set by
678 * verify_refname_available() is OK.
@@ -710,7 +709,7 @@ retry:
709 */
710 if (refs_verify_refname_available(
711 refs->packed_ref_store, refname,
713 - extras, skip, err))
712 + extras, NULL, err))
713 goto error_return;
714 }
715
@@ -2407,7 +2406,7 @@ static int lock_ref_for_update(struct files_ref_store *refs,
2406 }
2407
2408 ret = lock_raw_ref(refs, update->refname, mustexist,
2410 - affected_refnames, NULL,
2409 + affected_refnames,
2410 &lock, &referent,
2411 &update->type, err);
2412 if (ret) {