sha1_name: compare variable with constant, not constant with variable
commit1f27e7d56b65fdc232a5a2a4de2ee97ff5eb176b
authorFelipe Contreras <felipe.contreras@gmail.com>
Tue, 30 Apr 2013 21:49:11 +0000 (30 16:49 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 May 2013 19:13:12 +0000 (8 12:13 -0700)
tree01ad40cd6ed0dbb41bdcbcfe0eacb182ffa1b9ff
parentcdfd94837b27c220f70f032b596ea993d195488f
sha1_name: compare variable with constant, not constant with variable

And restructure the if/else to factor out the common "is len positive?"
test into a single conditional.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c