summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nbb/nbb_lib.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/nbb/nbb_lib.in b/nbb/nbb_lib.in
index 225e07e..60b7cba 100644
--- a/nbb/nbb_lib.in
+++ b/nbb/nbb_lib.in
@@ -376,7 +376,9 @@ class GitSourceTree(VCSourceTree):
if "true" != prog_stdout(["git", "rev-parse",
"--is-inside-work-tree"]):
raise NotAVCSourceTree()
- os.chdir(prog_stdout(["git", "rev-parse", "--show-cdup"]))
+ reldir = prog_stdout(["git", "rev-parse", "--show-cdup"])
+ if reldir:
+ os.chdir(reldir)
self.__tree_root = os.getcwd()
def tree_root(self):