hooks/pre-commit: check for deps repetitions
[topgit/greenrd.git] / tg-base.sh
blobd28cac1baaa2963a481dd2a4e7fba85f7c1b769e
1 #!/bin/sh
2 # TopGit - A different patch queue manager
3 # (c) Petr Baudis <pasky@suse.cz> 2008
4 # (c) Per Cederqvist <ceder@lysator.liu.se> 2010
5 # GPLv2
7 name="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')"
8 base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" || exit 1
9 echo $base_rev