All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Han-Wen Nienhuys" <hanwen@google.com>,
	"Michael Haggerty" <mhagger@alum.mit.edu>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 3/5] refs/ref-cache.[ch]: remove unused add_ref_entry()
Date: Tue, 28 Sep 2021 15:02:22 +0200	[thread overview]
Message-ID: <patch-3.5-962c1bffa21-20210928T130032Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.5-00000000000-20210928T130032Z-avarab@gmail.com>

This function has not been used since 9dd389f3d8d (packed_ref_store:
get rid of the `ref_cache` entirely, 2017-09-25).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 refs/ref-cache.c | 9 ---------
 refs/ref-cache.h | 7 -------
 2 files changed, 16 deletions(-)

diff --git a/refs/ref-cache.c b/refs/ref-cache.c
index e0feebf628f..a28883768c9 100644
--- a/refs/ref-cache.c
+++ b/refs/ref-cache.c
@@ -212,15 +212,6 @@ struct ref_entry *find_ref_entry(struct ref_dir *dir, const char *refname)
 	return (entry->flag & REF_DIR) ? NULL : entry;
 }
 
-int add_ref_entry(struct ref_dir *dir, struct ref_entry *ref)
-{
-	dir = find_containing_dir(dir, ref->name, 1);
-	if (!dir)
-		return -1;
-	add_entry_to_dir(dir, ref);
-	return 0;
-}
-
 /*
  * Emit a warning and return true iff ref1 and ref2 have the same name
  * and the same oid. Die if they have the same name but different
diff --git a/refs/ref-cache.h b/refs/ref-cache.h
index bd1ff578ea2..580d4038f62 100644
--- a/refs/ref-cache.h
+++ b/refs/ref-cache.h
@@ -199,13 +199,6 @@ void free_ref_cache(struct ref_cache *cache);
  */
 void add_entry_to_dir(struct ref_dir *dir, struct ref_entry *entry);
 
-/*
- * Add a ref_entry to the ref_dir (unsorted), recursing into
- * subdirectories as necessary.  dir must represent the top-level
- * directory.  Return 0 on success.
- */
-int add_ref_entry(struct ref_dir *dir, struct ref_entry *ref);
-
 /*
  * Find the value entry with the given name in dir, sorting ref_dirs
  * and recursing into subdirectories as necessary.  If the name is not
-- 
2.33.0.1340.ge9f77250f2b


  parent reply	other threads:[~2021-09-28 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 13:02 [PATCH 0/5] refs: remove long-dead code Ævar Arnfjörð Bjarmason
2021-09-28 13:02 ` [PATCH 1/5] refs.[ch]: remove unused ref_storage_backend_exists() Ævar Arnfjörð Bjarmason
2021-09-28 13:02 ` [PATCH 2/5] refs/ref-cache.[ch]: remove unused remove_entry_from_dir() Ævar Arnfjörð Bjarmason
2021-09-28 13:02 ` Ævar Arnfjörð Bjarmason [this message]
2021-09-28 13:02 ` [PATCH 4/5] refs/ref-cache.c: remove "mkdir" parameter from find_containing_dir() Ævar Arnfjörð Bjarmason
2021-09-28 13:02 ` [PATCH 5/5] refs/ref-cache.[ch]: remove "incomplete" from create_dir_entry() Ævar Arnfjörð Bjarmason
2021-09-28 17:58 ` [PATCH 0/5] refs: remove long-dead code Jeff King
2021-09-28 22:12 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patch-3.5-962c1bffa21-20210928T130032Z-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hanwen@google.com \
    --cc=mhagger@alum.mit.edu \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.