summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2008-06-21 18:05:30 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2008-06-21 18:05:30 +0200
commitf353c8a2ef53d33a0721869e65238935a319f029 (patch)
tree908579b41c0aa7e84ee0e9e80c824d9407e991a9
parent4701a7a56828071afc1f37833bcd152456917bb1 (diff)
nbb: Change to correct dir to find git top dir
-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):