2
2
* The backend-independent part of the reference module.
3
3
*/
4
4
5
- #define USE_THE_REPOSITORY_VARIABLE
6
-
7
5
#include "git-compat-util.h"
8
6
#include "advice.h"
9
7
#include "config.h"
@@ -1838,7 +1836,7 @@ const char *refs_resolve_ref_unsafe(struct ref_store *refs,
1838
1836
failure_errno != ENOTDIR )
1839
1837
return NULL ;
1840
1838
1841
- oidclr (oid , the_repository -> hash_algo );
1839
+ oidclr (oid , refs -> repo -> hash_algo );
1842
1840
if (* flags & REF_BAD_NAME )
1843
1841
* flags |= REF_ISBROKEN ;
1844
1842
return refname ;
@@ -1848,15 +1846,15 @@ const char *refs_resolve_ref_unsafe(struct ref_store *refs,
1848
1846
1849
1847
if (!(read_flags & REF_ISSYMREF )) {
1850
1848
if (* flags & REF_BAD_NAME ) {
1851
- oidclr (oid , the_repository -> hash_algo );
1849
+ oidclr (oid , refs -> repo -> hash_algo );
1852
1850
* flags |= REF_ISBROKEN ;
1853
1851
}
1854
1852
return refname ;
1855
1853
}
1856
1854
1857
1855
refname = sb_refname .buf ;
1858
1856
if (resolve_flags & RESOLVE_REF_NO_RECURSE ) {
1859
- oidclr (oid , the_repository -> hash_algo );
1857
+ oidclr (oid , refs -> repo -> hash_algo );
1860
1858
return refname ;
1861
1859
}
1862
1860
if (check_refname_format (refname , REFNAME_ALLOW_ONELEVEL )) {
@@ -2011,7 +2009,7 @@ struct ref_store *repo_get_submodule_ref_store(struct repository *repo,
2011
2009
free (subrepo );
2012
2010
goto done ;
2013
2011
}
2014
- refs = ref_store_init (subrepo , the_repository -> ref_storage_format ,
2012
+ refs = ref_store_init (subrepo , repo -> ref_storage_format ,
2015
2013
submodule_sb .buf ,
2016
2014
REF_STORE_READ | REF_STORE_ODB );
2017
2015
register_ref_store_map (& repo -> submodule_ref_stores , "submodule" ,
@@ -2045,7 +2043,7 @@ struct ref_store *get_worktree_ref_store(const struct worktree *wt)
2045
2043
common_path .buf , REF_STORE_ALL_CAPS );
2046
2044
strbuf_release (& common_path );
2047
2045
} else {
2048
- refs = ref_store_init (wt -> repo , the_repository -> ref_storage_format ,
2046
+ refs = ref_store_init (wt -> repo , wt -> repo -> ref_storage_format ,
2049
2047
wt -> repo -> commondir , REF_STORE_ALL_CAPS );
2050
2048
}
2051
2049
0 commit comments