From: Junio C Hamano Date: Tue, 17 Sep 2013 23:03:32 +0000 (-0700) Subject: upload-pack.c: do not pass confusing cb_data to mark_our_ref() X-Git-Tag: v1.8.4.3~3^2~8 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a4d695de0dbaf41505cb6db44c6bb8290980398e?ds=inline;hp=--cc upload-pack.c: do not pass confusing cb_data to mark_our_ref() The callee does not use cb_data, and the caller is an intermediate function in a callchain that later wants to use the cb_data for its own use. Clarify the code by breaking the dataflow explicitly by not passing cb_data down to mark_our_ref(). Signed-off-by: Junio C Hamano --- a4d695de0dbaf41505cb6db44c6bb8290980398e diff --git a/upload-pack.c b/upload-pack.c index 127e59a603..a6e107f0b1 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -742,7 +742,7 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo const char *refname_nons = strip_namespace(refname); unsigned char peeled[20]; - if (mark_our_ref(refname, sha1, flag, cb_data)) + if (mark_our_ref(refname, sha1, flag, NULL)) return 0; if (capabilities)