@@ -2332,7 +2332,7 @@ static int create_default_files(const char *template_path,
2332
2332
*/
2333
2333
copy_templates (template_path );
2334
2334
git_config_clear ();
2335
- reset_shared_repository ( );
2335
+ repo_settings_reset_shared_repository ( the_repository );
2336
2336
git_config (git_default_config , NULL );
2337
2337
2338
2338
reinit = is_reinit ();
@@ -2342,15 +2342,16 @@ static int create_default_files(const char *template_path,
2342
2342
* values we might have just re-read from the config.
2343
2343
*/
2344
2344
if (init_shared_repository != -1 )
2345
- set_shared_repository (init_shared_repository );
2345
+ repo_settings_set_shared_repository (the_repository ,
2346
+ init_shared_repository );
2346
2347
2347
2348
is_bare_repository_cfg = !work_tree ;
2348
2349
2349
2350
/*
2350
2351
* We would have created the above under user's umask -- under
2351
2352
* shared-repository settings, we would need to fix them up.
2352
2353
*/
2353
- if (get_shared_repository ( )) {
2354
+ if (repo_settings_get_shared_repository ( the_repository )) {
2354
2355
adjust_shared_perm (repo_get_git_dir (the_repository ));
2355
2356
}
2356
2357
@@ -2597,20 +2598,20 @@ int init_db(const char *git_dir, const char *real_git_dir,
2597
2598
initial_branch , flags & INIT_DB_QUIET );
2598
2599
create_object_directory ();
2599
2600
2600
- if (get_shared_repository ( )) {
2601
+ if (repo_settings_get_shared_repository ( the_repository )) {
2601
2602
char buf [10 ];
2602
2603
/* We do not spell "group" and such, so that
2603
2604
* the configuration can be read by older version
2604
2605
* of git. Note, we use octal numbers for new share modes,
2605
2606
* and compatibility values for PERM_GROUP and
2606
2607
* PERM_EVERYBODY.
2607
2608
*/
2608
- if (get_shared_repository ( ) < 0 )
2609
+ if (repo_settings_get_shared_repository ( the_repository ) < 0 )
2609
2610
/* force to the mode value */
2610
- xsnprintf (buf , sizeof (buf ), "0%o" , - get_shared_repository ( ));
2611
- else if (get_shared_repository ( ) == PERM_GROUP )
2611
+ xsnprintf (buf , sizeof (buf ), "0%o" , - repo_settings_get_shared_repository ( the_repository ));
2612
+ else if (repo_settings_get_shared_repository ( the_repository ) == PERM_GROUP )
2612
2613
xsnprintf (buf , sizeof (buf ), "%d" , OLD_PERM_GROUP );
2613
- else if (get_shared_repository ( ) == PERM_EVERYBODY )
2614
+ else if (repo_settings_get_shared_repository ( the_repository ) == PERM_EVERYBODY )
2614
2615
xsnprintf (buf , sizeof (buf ), "%d" , OLD_PERM_EVERYBODY );
2615
2616
else
2616
2617
BUG ("invalid value for shared_repository" );
@@ -2622,12 +2623,12 @@ int init_db(const char *git_dir, const char *real_git_dir,
2622
2623
int len = strlen (git_dir );
2623
2624
2624
2625
if (reinit )
2625
- printf (get_shared_repository ( )
2626
+ printf (repo_settings_get_shared_repository ( the_repository )
2626
2627
? _ ("Reinitialized existing shared Git repository in %s%s\n" )
2627
2628
: _ ("Reinitialized existing Git repository in %s%s\n" ),
2628
2629
git_dir , len && git_dir [len - 1 ] != '/' ? "/" : "" );
2629
2630
else
2630
- printf (get_shared_repository ( )
2631
+ printf (repo_settings_get_shared_repository ( the_repository )
2631
2632
? _ ("Initialized empty shared Git repository in %s%s\n" )
2632
2633
: _ ("Initialized empty Git repository in %s%s\n" ),
2633
2634
git_dir , len && git_dir [len - 1 ] != '/' ? "/" : "" );
0 commit comments