Skip to content

Commit bc98201

Browse files
mhaggergitster
authored andcommitted
show_ref(): remove unused "flag" and "cb_data" arguments
The function is not used as a callback, so it doesn't need these arguments. Also change its return type to void. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b7a025d commit bc98201

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

builtin/receive-pack.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
114114
return git_default_config(var, value, cb);
115115
}
116116

117-
static int show_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data)
117+
static void show_ref(const char *path, const unsigned char *sha1)
118118
{
119119
if (sent_capabilities)
120120
packet_write(1, "%s %s\n", sha1_to_hex(sha1), path);
@@ -124,10 +124,9 @@ static int show_ref(const char *path, const unsigned char *sha1, int flag, void
124124
" report-status delete-refs side-band-64k",
125125
prefer_ofs_delta ? " ofs-delta" : "");
126126
sent_capabilities = 1;
127-
return 0;
128127
}
129128

130-
static int show_ref_cb(const char *path, const unsigned char *sha1, int flag, void *cb_data)
129+
static int show_ref_cb(const char *path, const unsigned char *sha1, int flag, void *unused)
131130
{
132131
path = strip_namespace(path);
133132
/*
@@ -140,7 +139,8 @@ static int show_ref_cb(const char *path, const unsigned char *sha1, int flag, vo
140139
*/
141140
if (!path)
142141
path = ".have";
143-
return show_ref(path, sha1, flag, cb_data);
142+
show_ref(path, sha1);
143+
return 0;
144144
}
145145

146146
static void add_one_alternate_sha1(const unsigned char sha1[20], void *unused)
@@ -162,7 +162,7 @@ static void write_head_info(void)
162162
sha1_array_clear(&sa);
163163
for_each_ref(show_ref_cb, NULL);
164164
if (!sent_capabilities)
165-
show_ref("capabilities^{}", null_sha1, 0, NULL);
165+
show_ref("capabilities^{}", null_sha1);
166166
clear_extra_refs();
167167

168168
/* EOF */

0 commit comments

Comments
 (0)