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 bd0187b..644d60c 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" && \