File tree 3 files changed +7
-1
lines changed
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -27,5 +27,6 @@ Contributors are:
27
27
-Charles Bouchard-Légaré <cblegare.atl _at_ ntis.ca>
28
28
-Yaroslav Halchenko <debian _at_ onerussian.com>
29
29
-Tim Swast <swast _at_ google.com>
30
+ -William Luc Ritchie
30
31
31
32
Portions 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):
416
416
elif config_level == "global" :
417
417
return osp .normpath (osp .expanduser ("~/.gitconfig" ))
418
418
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" ))
420
420
421
421
raise ValueError ("Invalid configuration level: %r" % config_level )
422
422
Original file line number Diff line number Diff line change @@ -974,6 +974,11 @@ def test_git_work_tree_dotgit(self, rw_dir):
974
974
commit = repo .head .commit
975
975
self .assertIsInstance (commit , Object )
976
976
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
+
977
982
self .assertIsInstance (repo .heads ['aaaaaaaa' ], Head )
978
983
979
984
@with_rw_directory
You can’t perform that action at this time.
0 commit comments