summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-19 16:57:11 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-19 16:57:11 +0100
commit20863cfe4a1b0c5bea18677470a969073570e41c (patch)
tree3e64226fb902a4558ba1765f7f4fa6d4cc8a2524 /git/repo/base.py
parenta223c7b7730c53c3fa1e4c019bd3daefbb8fd74b (diff)
downloadgitpython-20863cfe4a1b0c5bea18677470a969073570e41c.tar.gz
Implemented Submodule.rename()
A test verifies it's truly working. Related to #238
Diffstat (limited to 'git/repo/base.py')
-rw-r--r--git/repo/base.py9
1 files changed, 9 insertions, 0 deletions
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):