Also support (un)tagging
This commit is contained in:
parent
b0a1289cd3
commit
96a07f353a
|
@ -92,6 +92,7 @@ _hook_update()
|
||||||
[ -z "$author" ] && author="$USER"
|
[ -z "$author" ] && author="$USER"
|
||||||
repository="$GL_REPO"
|
repository="$GL_REPO"
|
||||||
branch=
|
branch=
|
||||||
|
type="push"
|
||||||
|
|
||||||
#analyze the push
|
#analyze the push
|
||||||
message=
|
message=
|
||||||
|
@ -102,15 +103,21 @@ _hook_update()
|
||||||
refs/heads/*)
|
refs/heads/*)
|
||||||
branch=${refname#refs/heads/}
|
branch=${refname#refs/heads/}
|
||||||
[ -n "$branch" ] && message="$message [$branch]"
|
[ -n "$branch" ] && message="$message [$branch]"
|
||||||
|
type="branch"
|
||||||
|
;;
|
||||||
|
refs/tags/*)
|
||||||
|
tag=${refname#refs/tags/}
|
||||||
|
[ -n "$tag" ] && message="$message [$tag]"
|
||||||
|
type="tag"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
[ -n "$refname" ] && message="$message [$refname]"
|
[ -n "$refname" ] && message="$message [$refname]"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [ "$oldrev" = "$nullrev" ]; then
|
if [ "$oldrev" = "$nullrev" ]; then
|
||||||
message="$message new branch"
|
message="$message new $type"
|
||||||
elif [ "$newrev" = "$nullrev" ]; then
|
elif [ "$newrev" = "$nullrev" ]; then
|
||||||
message="$message branch deleted"
|
message="$message $type deleted"
|
||||||
else
|
else
|
||||||
commit_cnt=0
|
commit_cnt=0
|
||||||
all_files=
|
all_files=
|
||||||
|
|
Loading…
Reference in New Issue
Block a user