]> git.ipfire.org Git - thirdparty/git.git/commitdiff
packfile: make `close_pack_revindex()` static
authorTaylor Blau <me@ttaylorr.com>
Sat, 4 Dec 2021 22:51:38 +0000 (17:51 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 5 Dec 2021 07:01:38 +0000 (23:01 -0800)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c
packfile.h

index 1fec12ac5f4c74448d5bf58699d9a05f654ef3b6..32c31443334289ac391666076c53c7d67189a88c 100644 (file)
@@ -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;
 
index 4cfec9e8d3cc3e2b82f7a9e3cae636db8fc5a11c..a58fc738e06319624b666c80e2636217400cdda9 100644 (file)
@@ -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 **);