From 89df64132ccd76568ade04b5cf4e68cb67f0c5c0 Mon Sep 17 00:00:00 2001 From: Luc Ritchie Date: Fri, 14 Sep 2018 13:10:37 -0400 Subject: Respect _common_dir when finding repository config file Among other things, remotes are now correctly identified when in a separate worktree. --- git/repo/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/repo') diff --git a/git/repo/base.py b/git/repo/base.py index 023582b5..125ab802 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -416,7 +416,7 @@ class Repo(object): elif config_level == "global": return osp.normpath(osp.expanduser("~/.gitconfig")) elif config_level == "repository": - return osp.normpath(osp.join(self.git_dir, "config")) + return osp.normpath(osp.join(self._common_dir or self.git_dir, "config")) raise ValueError("Invalid configuration level: %r" % config_level) -- cgit v1.2.3