1
- #define USE_THE_REPOSITORY_VARIABLE
2
1
#define DISABLE_SIGN_COMPARE_WARNINGS
3
2
4
3
#include "git-compat-util.h"
@@ -72,14 +71,14 @@ void init_add_i_state(struct add_i_state *s, struct repository *r)
72
71
s -> use_color ? GIT_COLOR_RESET : "" , COLOR_MAXLEN );
73
72
74
73
FREE_AND_NULL (s -> interactive_diff_filter );
75
- git_config_get_string ( "interactive.difffilter" ,
76
- & s -> interactive_diff_filter );
74
+ repo_config_get_string ( r , "interactive.difffilter" ,
75
+ & s -> interactive_diff_filter );
77
76
78
77
FREE_AND_NULL (s -> interactive_diff_algorithm );
79
- git_config_get_string ( "diff.algorithm" ,
80
- & s -> interactive_diff_algorithm );
78
+ repo_config_get_string ( r , "diff.algorithm" ,
79
+ & s -> interactive_diff_algorithm );
81
80
82
- git_config_get_bool ( "interactive.singlekey" , & s -> use_single_key );
81
+ repo_config_get_bool ( r , "interactive.singlekey" , & s -> use_single_key );
83
82
if (s -> use_single_key )
84
83
setbuf (stdin , NULL );
85
84
}
@@ -535,7 +534,7 @@ static int get_modified_files(struct repository *r,
535
534
size_t * binary_count )
536
535
{
537
536
struct object_id head_oid ;
538
- int is_initial = !refs_resolve_ref_unsafe (get_main_ref_store (the_repository ),
537
+ int is_initial = !refs_resolve_ref_unsafe (get_main_ref_store (r ),
539
538
"HEAD" , RESOLVE_REF_READING ,
540
539
& head_oid , NULL );
541
540
struct collection_status s = { 0 };
@@ -560,7 +559,7 @@ static int get_modified_files(struct repository *r,
560
559
s .skip_unseen = filter && i ;
561
560
562
561
opt .def = is_initial ?
563
- empty_tree_oid_hex (the_repository -> hash_algo ) : oid_to_hex (& head_oid );
562
+ empty_tree_oid_hex (r -> hash_algo ) : oid_to_hex (& head_oid );
564
563
565
564
repo_init_revisions (r , & rev , NULL );
566
565
setup_revisions (0 , NULL , & rev , & opt );
@@ -765,7 +764,7 @@ static int run_revert(struct add_i_state *s, const struct pathspec *ps,
765
764
size_t count , i , j ;
766
765
767
766
struct object_id oid ;
768
- int is_initial = !refs_resolve_ref_unsafe (get_main_ref_store (the_repository ),
767
+ int is_initial = !refs_resolve_ref_unsafe (get_main_ref_store (s -> r ),
769
768
"HEAD" , RESOLVE_REF_READING ,
770
769
& oid ,
771
770
NULL );
@@ -996,7 +995,7 @@ static int run_diff(struct add_i_state *s, const struct pathspec *ps,
996
995
ssize_t count , i ;
997
996
998
997
struct object_id oid ;
999
- int is_initial = !refs_resolve_ref_unsafe (get_main_ref_store (the_repository ),
998
+ int is_initial = !refs_resolve_ref_unsafe (get_main_ref_store (s -> r ),
1000
999
"HEAD" , RESOLVE_REF_READING ,
1001
1000
& oid ,
1002
1001
NULL );
0 commit comments