From 4e23cd48f2f18d845a671515fae48216d594b4e0 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Fri, 13 Jan 2012 20:54:43 -0500 Subject: [PATCH] Detect the right git repo --- worker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worker.py b/worker.py index 8905c43..8951f04 100644 --- a/worker.py +++ b/worker.py @@ -27,7 +27,8 @@ def partition(pred, arg): return filter(pred, arg), filter(lambda a: not pred(a), arg) def git_rev(): - if not os.environ['FLOCK_PATH_IGNORE']: + os.environ['GIT_DIR'] = os.path.join(os.path.dirname(__file__) or '.', '.git') + if 'FLOCK_PATH_IGNORE' not in os.environ: if check_output('git status -z -uno'.split()): return None return check_output('git rev-parse HEAD'.split()).strip()[:10]