Skip to content

Commit

Permalink
upload-pack.c: do not pass confusing cb_data to mark_our_ref()
Browse files Browse the repository at this point in the history
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 <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Sep 18, 2013
1 parent a4dfee0 commit a4d695d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a4d695d

Please sign in to comment.