From 20863cfe4a1b0c5bea18677470a969073570e41c Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 19 Jan 2015 16:57:11 +0100 Subject: Implemented Submodule.rename() A test verifies it's truly working. Related to #238 --- git/repo/base.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'git/repo/base.py') diff --git a/git/repo/base.py b/git/repo/base.py index f3dd05b3..9ddb1ce8 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -868,6 +868,15 @@ class Repo(object): self.git.archive(treeish, *path, **kwargs) return self + def has_separate_working_tree(self): + """:return: True if our git_dir is not at the root of our working_tree_dir, but a .git file with a + platform agnositic symbolic link. Our git_dir will be whereever the .git file points to + :note: bare repositories will always return False here + """ + if self.bare: + return False + return os.path.isfile(os.path.join(self.working_tree_dir, '.git')) + rev_parse = rev_parse def __repr__(self): -- cgit v1.2.3