Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Soffian <jaysoffian@gmail.com>2009-02-27 22:10:04 +0300
committerJunio C Hamano <gitster@pobox.com>2009-02-28 02:08:08 +0300
commit7b3db095d53d19e08b27114d8706ff3be6693af7 (patch)
tree60231bbfbede85ab1672129b7ca3f375c982a421 /builtin-clone.c
parent6cb4e6cc0f5b2de1998492b0178eeb0f99d4a800 (diff)
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 'builtin-clone.c')
0 files changed, 0 insertions, 0 deletions