File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -27,5 +27,6 @@ Contributors are:
2727-Charles Bouchard-Légaré <cblegare.atl _at_ ntis.ca>
2828-Yaroslav Halchenko <debian _at_ onerussian.com>
2929-Tim Swast <swast _at_ google.com>
30+ -William Luc Ritchie
3031
3132Portions derived from other open source works and are clearly marked.
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ def _get_config_path(self, config_level):
416416 elif config_level == "global" :
417417 return osp .normpath (osp .expanduser ("~/.gitconfig" ))
418418 elif config_level == "repository" :
419- return osp .normpath (osp .join (self .git_dir , "config" ))
419+ return osp .normpath (osp .join (self ._common_dir or self . git_dir , "config" ))
420420
421421 raise ValueError ("Invalid configuration level: %r" % config_level )
422422
Original file line number Diff line number Diff line change @@ -974,6 +974,11 @@ def test_git_work_tree_dotgit(self, rw_dir):
974974 commit = repo .head .commit
975975 self .assertIsInstance (commit , Object )
976976
977+ # this ensures we can read the remotes, which confirms we're reading
978+ # the config correctly.
979+ origin = repo .remotes .origin
980+ self .assertIsInstance (origin , Remote )
981+
977982 self .assertIsInstance (repo .heads ['aaaaaaaa' ], Head )
978983
979984 @with_rw_directory
You can’t perform that action at this time.
0 commit comments