add_existing(): do not retain a reference to sha1
commitf83918edcb6fbcd1c5d8378c11e57edcc47bd232
authorMichael Haggerty <mhagger@alum.mit.edu>
Sat, 25 May 2013 09:08:17 +0000 (25 11:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 Jun 2013 22:28:47 +0000 (2 15:28 -0700)
treedeba23698bc8bfcc3498d6944676a971a0f176c1
parent5b87d8d3f53c1dfb54027123af612488abc85006
add_existing(): do not retain a reference to sha1

Its lifetime is not guaranteed, so make a copy.  Free the memory when
the string_list is cleared.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c