@@ -844,7 +844,7 @@ int is_per_worktree_ref(const char *refname)
844844 starts_with (refname , "refs/rewritten/" );
845845}
846846
847- static int is_pseudoref_syntax (const char * refname )
847+ static int is_root_ref_syntax (const char * refname )
848848{
849849 const char * c ;
850850
@@ -853,16 +853,12 @@ static int is_pseudoref_syntax(const char *refname)
853853 return 0 ;
854854 }
855855
856- /*
857- * HEAD is not a pseudoref, but it certainly uses the
858- * pseudoref syntax.
859- */
860856 return 1 ;
861857}
862858
863- int is_pseudoref (struct ref_store * refs , const char * refname )
859+ int is_root_ref (struct ref_store * refs , const char * refname )
864860{
865- static const char * const irregular_pseudorefs [] = {
861+ static const char * const irregular_root_refs [] = {
866862 "AUTO_MERGE" ,
867863 "BISECT_EXPECTED_REV" ,
868864 "NOTES_MERGE_PARTIAL" ,
@@ -872,7 +868,7 @@ int is_pseudoref(struct ref_store *refs, const char *refname)
872868 struct object_id oid ;
873869 size_t i ;
874870
875- if (!is_pseudoref_syntax (refname ))
871+ if (!is_root_ref_syntax (refname ))
876872 return 0 ;
877873
878874 if (ends_with (refname , "_HEAD" )) {
@@ -882,8 +878,8 @@ int is_pseudoref(struct ref_store *refs, const char *refname)
882878 return !is_null_oid (& oid );
883879 }
884880
885- for (i = 0 ; i < ARRAY_SIZE (irregular_pseudorefs ); i ++ )
886- if (!strcmp (refname , irregular_pseudorefs [i ])) {
881+ for (i = 0 ; i < ARRAY_SIZE (irregular_root_refs ); i ++ )
882+ if (!strcmp (refname , irregular_root_refs [i ])) {
887883 refs_resolve_ref_unsafe (refs , refname ,
888884 RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE ,
889885 & oid , NULL );
@@ -902,7 +898,7 @@ int is_headref(struct ref_store *refs, const char *refname)
902898}
903899
904900static int is_current_worktree_ref (const char * ref ) {
905- return is_pseudoref_syntax (ref ) || is_per_worktree_ref (ref );
901+ return is_root_ref_syntax (ref ) || is_per_worktree_ref (ref );
906902}
907903
908904enum ref_worktree_type parse_worktree_ref (const char * maybe_worktree_ref ,
0 commit comments