[PATCH 1/4] filter_ref: avoid overwriting ref-old_sha1 with garbage

2015-03-19 Thread Jeff King
If the server supports allow_tip_sha1_in_want, then fetch-pack's filter_refs function tries to check whether a ref is a request for a straight sha1 by running: if (get_sha1_hex(ref-name, ref-old_sha1)) ... I.e., we are using get_sha1_hex to ask is this ref name a sha1?. If it is

Re: [PATCH 1/4] filter_ref: avoid overwriting ref-old_sha1 with garbage

2015-03-19 Thread Junio C Hamano
Jeff King p...@peff.net writes: I wonder if the thinking in the original was that it was our responsibility here to make sure that ref-old_sha1 was filled in. I am reasonably sure that is the (perhaps mistaken) reasoning behind the use of old_sha1 as the second parameter to get_sha1_hex().