aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/git.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-11-13 15:27:07 -0500
committerW. Trevor King <wking@drexel.edu>2008-11-13 15:27:07 -0500
commitf6253f4c6ba301954a5b9beed4e5b41e74bb8004 (patch)
treeac89bd6bfead338a7cd3c7e6edc1326a34520157 /libbe/git.py
parent49f81fa291ca925ec985dc52f51b9a37bb3106ee (diff)
downloadbugseverywhere-f6253f4c6ba301954a5b9beed4e5b41e74bb8004.tar.gz
Oops... *Now* I've fixed 0cad
Diffstat (limited to 'libbe/git.py')
-rw-r--r--libbe/git.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbe/git.py b/libbe/git.py
index 5c377fd..172c324 100644
--- a/libbe/git.py
+++ b/libbe/git.py
@@ -22,7 +22,11 @@ def strip_git(filename):
# Find the base path of the GIT tree, in order to strip that leading
# path from arguments to git -- it doesn't like absolute paths.
if os.path.isabs(filename):
- filename = filename[len(git_repo_for_path('.'))+1:]
+ absRepoDir = os.path.abspath(git_repo_for_path('.'))
+ absRepoSlashedDir = os.path.join(absRepoDir,"")
+ assert filename.startswith(absRepoSlashedDir), \
+ "file %s not in git repo %s" % (filename, absRepoSlashedDir)
+ filename = filename.lstrip(absRepoSlashedDir)
return filename
def invoke_client(*args, **kwargs):