From: Nguyễn Thái Ngọc Duy Date: Sun, 13 Nov 2011 10:22:14 +0000 (+0700) Subject: Convert many resolve_ref() calls to read_ref*() and ref_exists() X-Git-Tag: v1.7.9-rc0~82^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c6893323917cbf4cb66c29ba2ac03014a44f0f0c?hp=c6893323917cbf4cb66c29ba2ac03014a44f0f0c Convert many resolve_ref() calls to read_ref*() and ref_exists() resolve_ref() may return a pointer to a static buffer, which is not safe for long-term use because if another resolve_ref() call happens, the buffer may be changed. Many call sites though do not care about this buffer. They simply check if the return value is NULL or not. Convert all these call sites to new wrappers to reduce resolve_ref() calls from 57 to 34. If we change resolve_ref() prototype later on to avoid passing static buffer out, this helps reduce changes. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano ---