On Tue, Jun 02, 2015 at 11:10:22PM +0200, Michael Haggerty wrote: > >> + > >> + if (!(flag & REF_ISBROKEN) && is_null_sha1(sha1)) { > > > > Why do we do the extra check for !(flag & REF_ISBROKEN) here? > > That was an attempt to avoid calling is_null_sha1() unnecessarily. I > think I can make this go away and make the code clearer in general by > restructuring the logic a little bit. I will do that in the next round. If you get rid of the useless hashclr(), then this just becomes: if (!(flag & REF_ISBROKEN) && is_null_sha1(sha1)) flag |= REF_ISBROKEN; The reason for the initial check seems pretty obvious then (but it would also be OK without it; is_null_sha1 is not that expensive). -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html