Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
show_ref(): remove unused "flag" and "cb_data" arguments
author
Michael Haggerty
<mhagger@alum.mit.edu>
Fri, 6 Jan 2012 14:12:32 +0000
(15:12 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 6 Jan 2012 19:15:04 +0000
(11:15 -0800)
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 <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b7a025d
)
diff --git
a/builtin/receive-pack.c
b/builtin/receive-pack.c
index 43d161f811d43a554017652060796440f2806be4..eb878c57317f80dfc8be332683d2b1ef2a67a35b 100644
(file)
--- a/
builtin/receive-pack.c
+++ b/
builtin/receive-pack.c
@@
-114,7
+114,7
@@
static int receive_pack_config(const char *var, const char *value, void *cb)
return git_default_config(var, value, cb);
}
return git_default_config(var, value, cb);
}
-static
int show_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data
)
+static
void show_ref(const char *path, const unsigned char *sha1
)
{
if (sent_capabilities)
packet_write(1, "%s %s\n", sha1_to_hex(sha1), path);
{
if (sent_capabilities)
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
" report-status delete-refs side-band-64k",
prefer_ofs_delta ? " ofs-delta" : "");
sent_capabilities = 1;
" report-status delete-refs side-band-64k",
prefer_ofs_delta ? " ofs-delta" : "");
sent_capabilities = 1;
- return 0;
}
}
-static int show_ref_cb(const char *path, const unsigned char *sha1, int flag, void *
cb_data
)
+static int show_ref_cb(const char *path, const unsigned char *sha1, int flag, void *
unused
)
{
path = strip_namespace(path);
/*
{
path = strip_namespace(path);
/*
@@
-140,7
+139,8
@@
static int show_ref_cb(const char *path, const unsigned char *sha1, int flag, vo
*/
if (!path)
path = ".have";
*/
if (!path)
path = ".have";
- return show_ref(path, sha1, flag, cb_data);
+ show_ref(path, sha1);
+ return 0;
}
static void add_one_alternate_sha1(const unsigned char sha1[20], void *unused)
}
static void add_one_alternate_sha1(const unsigned char sha1[20], void *unused)
@@
-162,7
+162,7
@@
static void write_head_info(void)
sha1_array_clear(&sa);
for_each_ref(show_ref_cb, NULL);
if (!sent_capabilities)
sha1_array_clear(&sa);
for_each_ref(show_ref_cb, NULL);
if (!sent_capabilities)
- show_ref("capabilities^{}", null_sha1
, 0, NULL
);
+ show_ref("capabilities^{}", null_sha1);
clear_extra_refs();
/* EOF */
clear_extra_refs();
/* EOF */