summaryrefslogtreecommitdiff
path: root/t/t4252/am-test-5-1
diff options
context:
space:
mode:
authorLibravatar Jay Soffian <jaysoffian@gmail.com>2009-02-27 14:10:04 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-02-27 15:08:08 -0800
commit7b3db095d53d19e08b27114d8706ff3be6693af7 (patch)
tree60231bbfbede85ab1672129b7ca3f375c982a421 /t/t4252/am-test-5-1
parentremote: simplify guess_remote_head() (diff)
downloadtgif-7b3db095d53d19e08b27114d8706ff3be6693af7.tar.xz
remote: make copy_ref() perform a deep copy
To ensure that copied refs can always be freed w/o causing a double-free, make copy_ref() perform a deep copy. Also have copy_ref() return NULL if asked to copy NULL to simplify things for the caller. Background: currently copy_ref() performs a shallow copy. This is fine for current callers who never free the result and/or only copy refs which contain NULL pointers. But copy_ref() is about to gain a new caller (guess_remote_head()) which copies refs where peer_ref is not NULL and the caller of guess_remote_head() will want to free the result. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4252/am-test-5-1')
0 files changed, 0 insertions, 0 deletions