Message ID | 20240607133304.2333280-7-knayak@gitlab.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f1dcdd6deb6bdd57e3e8dad5aa7a3fcc1526b9ec |
Headers | show |
Series | update-ref: add symref support for --stdin | expand |
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c index c66ab9ecd8..1c46fc87f8 100644 --- a/refs/reftable-backend.c +++ b/refs/reftable-backend.c @@ -895,8 +895,9 @@ static int reftable_be_transaction_prepare(struct ref_store *ref_store, */ new_update = ref_transaction_add_update( transaction, referent.buf, new_flags, - &u->new_oid, &u->old_oid, u->new_target, - u->old_target, u->msg); + u->new_target ? NULL : &u->new_oid, + u->old_target ? NULL : &u->old_oid, + u->new_target, u->old_target, u->msg); new_update->parent_update = u;