]> git.ipfire.org Git - thirdparty/git.git/commit - notes.c
string_list_add_refs_by_glob(): add a comment about memory management
authorMichael Haggerty <mhagger@alum.mit.edu>
Sat, 25 May 2013 09:08:21 +0000 (11:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 Jun 2013 22:28:47 +0000 (15:28 -0700)
commit8c46bf904fe95105faaa1823332c91d2802182c2
tree6bdaa8f5f35adaa47cc86779d2e6a40d0fb47212
parentd235e994f893fddd7808a4f5af879fd718563649
string_list_add_refs_by_glob(): add a comment about memory management

Since string_list_add_one_ref() adds refname to the string list, but
the lifetime of refname is limited, it is important that the
string_list passed to string_list_add_one_ref() has strdup_strings
set.  Document this fact.

All current callers do the right thing.

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