Skip to content

Commit e4776bd

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9859a02 commit e4776bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/revert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ static int rollback_single_pick(void)
901901
if (!file_exists(git_path("CHERRY_PICK_HEAD")) &&
902902
!file_exists(git_path("REVERT_HEAD")))
903903
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))
905905
return error(_("cannot resolve HEAD"));
906906
if (is_null_sha1(head_sha1))
907907
return error(_("cannot abort from a branch yet to be born"));

0 commit comments

Comments
 (0)