lock_ref_sha1_basic(): do not set force_write for missing references
commit074336e5ed4ff10577f22c6812e092e3f6607405
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 2 Mar 2015 09:29:53 +0000 (2 10:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Mar 2015 20:35:36 +0000 (5 12:35 -0800)
tree3d9efa59a808ca5a226f679454e9640b94a3a092
parent706d5f816fbcb1299c19f4d41bea60f1e229165e
lock_ref_sha1_basic(): do not set force_write for missing references

If a reference is missing, its SHA-1 will be null_sha1, which can't
possibly match a new value that ref_transaction_commit() is trying to
update it to. So there is no need to set force_write in this scenario.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c