override branch in hook to the currently checked out
authorMichael Wallner <mike@php.net>
Tue, 16 Sep 2014 16:04:30 +0000 (18:04 +0200)
committerMichael Wallner <mike@php.net>
Tue, 16 Sep 2014 16:04:30 +0000 (18:04 +0200)
bin/btr-hook

index bd0187bc5261803b745eea13e642a18feb19460e..644d60c075ef45d6655a823a68d8fc963c6e2ce8 100755 (executable)
@@ -29,7 +29,7 @@ git)
                        else
                                echo "#!/bin/bash"
                        fi
-                       echo $(btr-conf-dump) "'$BTR_BINDIR/btr' -qy &"
+                       echo $(btr-conf-dump) 'BTR_BRANCH=$(basename $(git symbolic-ref HEAD))' "'$BTR_BINDIR/btr' -qy &"
                ) >"$BTR_HOOK_FILE.tmp" && \
                        chmod +x "$BTR_HOOK_FILE.tmp" && \
                        mv "$BTR_HOOK_FILE.tmp" "$BTR_HOOK_FILE" && \