git.droids-corp.org
/
git-central.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
75f0ea2e0d857fe3131d39ce8d7fcadfa0c39cbc
[git-central.git]
/
scripts
/
gc-tattoo
1
#!/bin/sh
2
3
head=$(git rev-parse HEAD)
4
branch=$(git symbolic-ref --quiet HEAD)
5
if [ $? -ne 0 ] ; then
6
echo "unknown"
7
exit 1
8
fi
9
10
case "$branch" in
11
refs/heads/*)
12
branch=${branch##refs/heads/}
13
number=$(git rev-list --first-parent "$head" ^stable | wc -l)
14
echo "$branch-$number"
15
;;
16
*)
17
echo "unknown"
18
exit 1
19
esac
20