Skip to content

Instantly share code, notes, and snippets.

Last active Dec 19, 2015
What would you like to do?
git hooks to CYA when using hg-git mode with git-remote-hg
test "2" = `grep -e '^--HG--$' -e '^branch : [^ ][^ ]*$' "$1"|wc -l` || {
echo >&2 Missing hg branch specification.
exit 1
grep -q '^--HG--$' "$1" || echo '--HG--
branch : '"`git symbolic-ref -q --short HEAD`" >> "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment