describe: make own copy of refname
authorMichael Haggerty <mhagger@alum.mit.edu>
Sat, 25 May 2013 09:08:00 +0000 (11:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 16:25:00 +0000 (09:25 -0700)
commit219a0f33cae0f164f4353b2171ecd4c08d5b7ced
tree60eeeb45670c12f12a70467ed62917b558c316e2
parent5e49f30c85ecacec98631462fa73f1148a01637c
describe: make own copy of refname

Do not retain a reference to the refname passed to the each_ref_fn
callback get_name(), because there is no guarantee of the lifetimes of
these names.  Instead, make a local copy when needed.

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