author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Mon, 12 Dec 2011 11:20:32 +0000 (18:20 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 13 Dec 2011 17:39:46 +0000 (09:39 -0800) | ||
commit | 8cad4744ee37ebec1d9491a1381ec1771a1ba795 | |
tree | 064bbe938f38727dd163aae9c95e2185b8075234 | tree | snapshot |
parent | 96ec7b1e708863d0cd6b8e72a986d6f0a1bb64db | commit | diff |
Rename resolve_ref() to resolve_ref_unsafe()
resolve_ref() may return a pointer to a shared buffer and can be
overwritten by the next resolve_ref() calls. Callers need to
pay attention, not to keep the pointer when the next call happens.
Rename with "_unsafe" suffix to warn developers (or reviewers) before
introducing new call sites.
This patch is generated using the following command
git grep -l 'resolve_ref(' -- '*.[ch]'|xargs sed -i 's/resolve_ref(/resolve_ref_unsafe(/g'
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
resolve_ref() may return a pointer to a shared buffer and can be
overwritten by the next resolve_ref() calls. Callers need to
pay attention, not to keep the pointer when the next call happens.
Rename with "_unsafe" suffix to warn developers (or reviewers) before
introducing new call sites.
This patch is generated using the following command
git grep -l 'resolve_ref(' -- '*.[ch]'|xargs sed -i 's/resolve_ref(/resolve_ref_unsafe(/g'
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 files changed:
branch.c | diff | blob | history | |
builtin/branch.c | diff | blob | history | |
builtin/commit.c | diff | blob | history | |
builtin/fsck.c | diff | blob | history | |
builtin/log.c | diff | blob | history | |
builtin/receive-pack.c | diff | blob | history | |
builtin/remote.c | diff | blob | history | |
builtin/show-branch.c | diff | blob | history | |
builtin/symbolic-ref.c | diff | blob | history | |
cache.h | diff | blob | history | |
refs.c | diff | blob | history | |
remote.c | diff | blob | history | |
transport.c | diff | blob | history |