@@ -811,12 +811,12 @@ static int loose_commit(git_filebuf *file, const git_reference *ref)
811811{
812812 assert (file && ref );
813813
814- if (ref -> type == GIT_REF_OID ) {
814+ if (ref -> type == GIT_REFERENCE_DIRECT ) {
815815 char oid [GIT_OID_HEXSZ + 1 ];
816816 git_oid_nfmt (oid , sizeof (oid ), & ref -> target .oid );
817817
818818 git_filebuf_printf (file , "%s\n" , oid );
819- } else if (ref -> type == GIT_REF_SYMBOLIC ) {
819+ } else if (ref -> type == GIT_REFERENCE_SYMBOLIC ) {
820820 git_filebuf_printf (file , GIT_SYMREF "%s\n" , ref -> target .symbolic );
821821 } else {
822822 assert (0 ); /* don't let this happen */
@@ -1142,19 +1142,19 @@ static int cmp_old_ref(int *cmp, git_refdb_backend *backend, const char *name,
11421142 goto out ;
11431143
11441144 /* If the types don't match, there's no way the values do */
1145- if (old_id && old_ref -> type != GIT_REF_OID ) {
1145+ if (old_id && old_ref -> type != GIT_REFERENCE_DIRECT ) {
11461146 * cmp = -1 ;
11471147 goto out ;
11481148 }
1149- if (old_target && old_ref -> type != GIT_REF_SYMBOLIC ) {
1149+ if (old_target && old_ref -> type != GIT_REFERENCE_SYMBOLIC ) {
11501150 * cmp = 1 ;
11511151 goto out ;
11521152 }
11531153
1154- if (old_id && old_ref -> type == GIT_REF_OID )
1154+ if (old_id && old_ref -> type == GIT_REFERENCE_DIRECT )
11551155 * cmp = git_oid_cmp (old_id , & old_ref -> target .oid );
11561156
1157- if (old_target && old_ref -> type == GIT_REF_SYMBOLIC )
1157+ if (old_target && old_ref -> type == GIT_REFERENCE_SYMBOLIC )
11581158 * cmp = git__strcmp (old_target , old_ref -> target .symbolic );
11591159
11601160out :
@@ -1184,7 +1184,7 @@ static int maybe_append_head(refdb_fs_backend *backend, const git_reference *ref
11841184 git_reference * tmp = NULL , * head = NULL , * peeled = NULL ;
11851185 const char * name ;
11861186
1187- if (ref -> type == GIT_REF_SYMBOLIC )
1187+ if (ref -> type == GIT_REFERENCE_SYMBOLIC )
11881188 return 0 ;
11891189
11901190 /* if we can't resolve, we use {0}*40 as old id */
@@ -1194,14 +1194,14 @@ static int maybe_append_head(refdb_fs_backend *backend, const git_reference *ref
11941194 if ((error = git_reference_lookup (& head , backend -> repo , GIT_HEAD_FILE )) < 0 )
11951195 return error ;
11961196
1197- if (git_reference_type (head ) == GIT_REF_OID )
1197+ if (git_reference_type (head ) == GIT_REFERENCE_DIRECT )
11981198 goto cleanup ;
11991199
12001200 if ((error = git_reference_lookup (& tmp , backend -> repo , GIT_HEAD_FILE )) < 0 )
12011201 goto cleanup ;
12021202
12031203 /* Go down the symref chain until we find the branch */
1204- while (git_reference_type (tmp ) == GIT_REF_SYMBOLIC ) {
1204+ while (git_reference_type (tmp ) == GIT_REFERENCE_SYMBOLIC ) {
12051205 error = git_reference_lookup (& peeled , backend -> repo , git_reference_symbolic_target (tmp ));
12061206 if (error < 0 )
12071207 break ;
@@ -1279,7 +1279,7 @@ static int refdb_fs_backend__write_tail(
12791279 goto on_error ;
12801280 }
12811281
1282- if (ref -> type == GIT_REF_SYMBOLIC )
1282+ if (ref -> type == GIT_REFERENCE_SYMBOLIC )
12831283 new_target = ref -> target .symbolic ;
12841284 else
12851285 new_id = & ref -> target .oid ;
@@ -1886,7 +1886,7 @@ static int reflog_append(refdb_fs_backend *backend, const git_reference *ref, co
18861886 git_buf buf = GIT_BUF_INIT , path = GIT_BUF_INIT ;
18871887 git_repository * repo = backend -> repo ;
18881888
1889- is_symbolic = ref -> type == GIT_REF_SYMBOLIC ;
1889+ is_symbolic = ref -> type == GIT_REFERENCE_SYMBOLIC ;
18901890
18911891 /* "normal" symbolic updates do not write */
18921892 if (is_symbolic &&
@@ -1979,7 +1979,7 @@ static int refdb_reflog_fs__rename(git_refdb_backend *_backend, const char *old_
19791979 repo = backend -> repo ;
19801980
19811981 if ((error = git_reference__normalize_name (
1982- & normalized , new_name , GIT_REF_FORMAT_ALLOW_ONELEVEL )) < 0 )
1982+ & normalized , new_name , GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL )) < 0 )
19831983 return error ;
19841984
19851985 if (git_buf_joinpath (& temp_path , repo -> gitdir , GIT_REFLOG_DIR ) < 0 )
0 commit comments