ref_transaction_update(): remove "have_old" parameter
Instead, verify the reference's old value if and only if old_sha1 is non-NULL. ref_transaction_delete() will get the same treatment in a moment. 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>
This commit is contained in:

committed by
Junio C Hamano

parent
8df4e51138
commit
1d147bdff0
2
walker.c
2
walker.c
@ -299,7 +299,7 @@ int walker_fetch(struct walker *walker, int targets, char **target,
|
||||
strbuf_reset(&refname);
|
||||
strbuf_addf(&refname, "refs/%s", write_ref[i]);
|
||||
if (ref_transaction_update(transaction, refname.buf,
|
||||
&sha1[20 * i], NULL, 0, 0,
|
||||
&sha1[20 * i], NULL, 0,
|
||||
msg ? msg : "fetch (unknown)",
|
||||
&err)) {
|
||||
error("%s", err.buf);
|
||||
|
Reference in New Issue
Block a user