revert: convert resolve_ref() to read_ref_full()
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>
Nguyễn Thái Ngọc Duy committed
Dec 12, 2011 at 18:20 UTC
e4776bd936aa162b7f00cb26260dc4a6ca444abb
1 file changed
+1
-1
builtin/revert.c
+1
-1
@@ -901,7 +901,7 @@ static int rollback_single_pick(void)
901
if (!file_exists(git_path("CHERRY_PICK_HEAD")) &&
902
!file_exists(git_path("REVERT_HEAD")))
903
return error(_("no cherry-pick or revert in progress"));
904
- if (!resolve_ref("HEAD", head_sha1, 0, NULL))
904
+ if (read_ref_full("HEAD", head_sha1, 0, NULL))
905
return error(_("cannot resolve HEAD"));
906
if (is_null_sha1(head_sha1))
907
return error(_("cannot abort from a branch yet to be born"));