summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9859a02)
raw | patch | inline | side by side (parent: 9859a02)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Mon, 12 Dec 2011 11:20:29 +0000 (18:20 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Dec 2011 17:30:23 +0000 (09:30 -0800) |
This is the follow up of c689332 (Convert many resolve_ref() calls to
read_ref*() and ref_exists() - 2011-11-13). See the said commit for
rationale.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read_ref*() and ref_exists() - 2011-11-13). See the said commit for
rationale.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/revert.c | patch | blob | history |
diff --git a/builtin/revert.c b/builtin/revert.c
index 1ea525c10e4c00b66006bf46465ebd490823f25f..0c52a8339da655082be22f1ecf9b9bec5e7863e3 100644 (file)
--- a/builtin/revert.c
+++ b/builtin/revert.c
if (!file_exists(git_path("CHERRY_PICK_HEAD")) &&
!file_exists(git_path("REVERT_HEAD")))
return error(_("no cherry-pick or revert in progress"));
- if (!resolve_ref("HEAD", head_sha1, 0, NULL))
+ if (read_ref_full("HEAD", head_sha1, 0, NULL))
return error(_("cannot resolve HEAD"));
if (is_null_sha1(head_sha1))
return error(_("cannot abort from a branch yet to be born"));