◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
22 changes: 22 additions & 0 deletions git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,28 @@ def __init__(
# It's important to normalize the paths, as submodules will otherwise
# initialize their repo instances with paths that depend on path-portions
# that will not exist after being removed. It's just cleaner.
if is_git_dir(curpath):
git_dir = curpath
# from man git-config : core.worktree
Expand Down
36 changes: 36 additions & 0 deletions test/test_repo.py
Original file line number Diff line number Diff line change
@@ -1126,6 +1126,42 @@ def test_git_work_tree_env(self, rw_dir):
self.assertEqual(r.working_tree_dir, repo_dir)
self.assertEqual(r.working_dir, repo_dir)

@with_rw_directory
def test_rebasing(self, rw_dir):
r = Repo.init(rw_dir)
Expand Down
Loading
Toggle all file notes Toggle all file annotations