@@ -2332,7 +2332,7 @@ static int create_default_files(const char *template_path,
23322332 */
23332333 copy_templates (template_path );
23342334 git_config_clear ();
2335- reset_shared_repository ( );
2335+ repo_settings_reset_shared_repository ( the_repository );
23362336 git_config (git_default_config , NULL );
23372337
23382338 reinit = is_reinit ();
@@ -2342,15 +2342,16 @@ static int create_default_files(const char *template_path,
23422342 * values we might have just re-read from the config.
23432343 */
23442344 if (init_shared_repository != -1 )
2345- set_shared_repository (init_shared_repository );
2345+ repo_settings_set_shared_repository (the_repository ,
2346+ init_shared_repository );
23462347
23472348 is_bare_repository_cfg = !work_tree ;
23482349
23492350 /*
23502351 * We would have created the above under user's umask -- under
23512352 * shared-repository settings, we would need to fix them up.
23522353 */
2353- if (get_shared_repository ( )) {
2354+ if (repo_settings_get_shared_repository ( the_repository )) {
23542355 adjust_shared_perm (repo_get_git_dir (the_repository ));
23552356 }
23562357
@@ -2597,20 +2598,20 @@ int init_db(const char *git_dir, const char *real_git_dir,
25972598 initial_branch , flags & INIT_DB_QUIET );
25982599 create_object_directory ();
25992600
2600- if (get_shared_repository ( )) {
2601+ if (repo_settings_get_shared_repository ( the_repository )) {
26012602 char buf [10 ];
26022603 /* We do not spell "group" and such, so that
26032604 * the configuration can be read by older version
26042605 * of git. Note, we use octal numbers for new share modes,
26052606 * and compatibility values for PERM_GROUP and
26062607 * PERM_EVERYBODY.
26072608 */
2608- if (get_shared_repository ( ) < 0 )
2609+ if (repo_settings_get_shared_repository ( the_repository ) < 0 )
26092610 /* 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 )
26122613 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 )
26142615 xsnprintf (buf , sizeof (buf ), "%d" , OLD_PERM_EVERYBODY );
26152616 else
26162617 BUG ("invalid value for shared_repository" );
@@ -2622,12 +2623,12 @@ int init_db(const char *git_dir, const char *real_git_dir,
26222623 int len = strlen (git_dir );
26232624
26242625 if (reinit )
2625- printf (get_shared_repository ( )
2626+ printf (repo_settings_get_shared_repository ( the_repository )
26262627 ? _ ("Reinitialized existing shared Git repository in %s%s\n" )
26272628 : _ ("Reinitialized existing Git repository in %s%s\n" ),
26282629 git_dir , len && git_dir [len - 1 ] != '/' ? "/" : "" );
26292630 else
2630- printf (get_shared_repository ( )
2631+ printf (repo_settings_get_shared_repository ( the_repository )
26312632 ? _ ("Initialized empty shared Git repository in %s%s\n" )
26322633 : _ ("Initialized empty Git repository in %s%s\n" ),
26332634 git_dir , len && git_dir [len - 1 ] != '/' ? "/" : "" );
0 commit comments