git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: ramsay@ramsayjones.plus.com
Subject: [PATCH] packfile: make `close_pack_revindex()` static
Date: Sat, 4 Dec 2021 17:51:38 -0500	[thread overview]
Message-ID: <dad2b73c84f1c1575a6bce04a449ee1236680b10.1638658219.git.me@ttaylorr.com> (raw)

Since its definition in 2f4ba2a867 (packfile: prepare for the existence
of '*.rev' files, 2021-01-25), the only caller of
`close_pack_revindex()` was within packfile.c.

Thus there is no need for this to be exposed via packfile.h, and instead
can remain static within packfile.c's compilation unit. While we're
here, move the function's opening brace onto its own line.

Noticed-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
Noticed by Ramsay in a separate thread[1], because the two
style/organization fixes here were propagated into the new cruft pack
code.

[1]: https://lore.kernel.org/git/ec008905-5e04-944d-f164-d52a622f0531@ramsayjones.plus.com/

 packfile.c | 3 ++-
 packfile.h | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/packfile.c b/packfile.c
index 6423d77faa..c38e749eb5 100644
--- a/packfile.c
+++ b/packfile.c
@@ -324,7 +324,8 @@ void close_pack_index(struct packed_git *p)
 	}
 }

-void close_pack_revindex(struct packed_git *p) {
+static void close_pack_revindex(struct packed_git *p)
+{
 	if (!p->revindex_map)
 		return;

diff --git a/packfile.h b/packfile.h
index 186146779d..a3f6723857 100644
--- a/packfile.h
+++ b/packfile.h
@@ -90,7 +90,6 @@ uint32_t get_pack_fanout(struct packed_git *p, uint32_t value);

 unsigned char *use_pack(struct packed_git *, struct pack_window **, off_t, unsigned long *);
 void close_pack_windows(struct packed_git *);
-void close_pack_revindex(struct packed_git *);
 void close_pack(struct packed_git *);
 void close_object_store(struct raw_object_store *o);
 void unuse_pack(struct pack_window **);
--
2.34.1.25.gb3157a20e6

                 reply	other threads:[~2021-12-04 22:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=dad2b73c84f1c1575a6bce04a449ee1236680b10.1638658219.git.me@ttaylorr.com \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsayjones.plus.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).