summaryrefslogtreecommitdiff
path: root/git/repo/base.py
diff options
context:
space:
mode:
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):