From: Anders Kaseorg Date: Sun, 21 Mar 2010 07:53:52 +0000 (-0400) Subject: zephyr-post-receive: Don’t truncate a branch name containing /. X-Git-Url: https://snippets.scripts.mit.edu/gitweb.cgi/Scripts/git/.git/commitdiff_plain/a4574a077d024f32da50d26416efd5346f423479 zephyr-post-receive: Don’t truncate a branch name containing /. Signed-off-by: Anders Kaseorg --- diff --git a/git-hooks/zephyr-post-receive b/git-hooks/zephyr-post-receive index a929432..11e36c6 100755 --- a/git-hooks/zephyr-post-receive +++ b/git-hooks/zephyr-post-receive @@ -39,7 +39,7 @@ fi while read oldrev newrev refname; do if [ "$oldrev" = "0000000000000000000000000000000000000000" ]; then # dammit git - zwrite -c "$class" -i "${instance:-$(basename "$refname")}" -s "$zsig: $refname" -d \ + zwrite -c "$class" -i "${instance:-${refname#refs/heads/}}" -s "$zsig: $refname" -d \ -m "New branch $refname created, currently at $newrev." continue fi