summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tissue/git.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/tissue/git.scm b/tissue/git.scm
index 334ffbc..c837da7 100644
--- a/tissue/git.scm
+++ b/tissue/git.scm
@@ -93,7 +93,11 @@ directory."
(define (git-top-level)
"Return the top-level directory of the current git repository."
- (dirname (repository-directory (current-git-repository))))
+ (let ((repository-directory
+ (repository-directory (current-git-repository))))
+ (if (repository-bare? (current-git-repository))
+ repository-directory
+ (dirname repository-directory))))
(define (head-tree repository)
"Return tree of HEAD in REPOSITORY."