summaryrefslogtreecommitdiff
path: root/t/t4013-diff-various.sh
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2015-02-17 18:00:21 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-02-17 11:24:59 -0800
commit16180334015ab44b0310b9d896e554a66c36a1a4 (patch)
tree367a45d10a3186a88121c42d28551650d814be94 /t/t4013-diff-various.sh
parentref_transaction_delete(): check that old_sha1 is not null_sha1 (diff)
downloadtgif-16180334015ab44b0310b9d896e554a66c36a1a4.tar.xz
ref_transaction_verify(): new function to check a reference's value
If NULL is passed to ref_transaction_update()'s new_sha1 parameter, then just verify old_sha1 (under lock) without trying to change the new value of the reference. Use this functionality to add a new function ref_transaction_verify(), which checks the current value of the reference under lock but doesn't change it. Use ref_transaction_verify() in the implementation of "git update-ref --stdin"'s "verify" command to avoid the awkward need to "update" the reference to its existing value. 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>
Diffstat (limited to 't/t4013-diff-various.sh')
0 files changed, 0 insertions, 0 deletions