cmd_update_ref(): make logic more straightforward
commite2991c80485c646c86f5d80423f9ae983bed120b
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 22 Jun 2015 14:03:09 +0000 (22 16:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jun 2015 20:17:14 +0000 (22 13:17 -0700)
treeeb7f420f02b65e1a006fafdf1f7325b7c44a9832
parenta1c9eb918b9af809d75ee3206e684f3a8f29ee63
cmd_update_ref(): make logic more straightforward

Restructure the code to avoid clearing oldsha1 when oldval is unset.
It's value is not needed in that case, so this change makes it more
obvious that its initialization is consistent with its later use.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-ref.c