diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-11-23 13:28:53 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-11-23 13:28:53 -0800 |
commit | 3686aa1caf907d22fe318c28efe93f0e7870ba50 (patch) | |
tree | f99a303bd14c7343be7ccc5b9df5382f1bf79246 /templates/hooks--update | |
parent | imap-send: Remove unused 'use_namespace' variable (diff) | |
parent | documentation fix: git difftool uses diff tools, not merge tools. (diff) | |
download | tgif-3686aa1caf907d22fe318c28efe93f0e7870ba50.tar.xz |
Merge branch 'maint' into tj/imap-send-remove-unused
* maint: (18123 commits)
documentation fix: git difftool uses diff tools, not merge tools.
Git 1.7.7.4
Makefile: add missing header file dependencies
notes merge: eliminate OUTPUT macro
mailmap: xcalloc mailmap_info
name-rev --all: do not even attempt to describe non-commit object
Git 1.7.7.3
docs: Update install-doc-quick
docs: don't mention --quiet or --exit-code in git-log(1)
Git 1.7.7.2
t7511: avoid use of reserved filename on Windows.
clone: Quote user supplied path in a single quote pair
read-cache.c: fix index memory allocation
make the sample pre-commit hook script reject names with newlines, too
Reindent closing bracket using tab instead of spaces
Git 1.7.7.1
RelNotes/1.7.7.1: setgid bit patch is about fixing "git init" via Makefile setting
gitweb: fix regression when filtering out forks
Almost ready for 1.7.7.1
pack-objects: don't traverse objects unnecessarily
...
Conflicts:
imap-send.c
Diffstat (limited to 'templates/hooks--update')
-rw-r--r-- | templates/hooks--update | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/templates/hooks--update b/templates/hooks--update deleted file mode 100644 index d7a8f0a849..0000000000 --- a/templates/hooks--update +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -# -# An example hook script to mail out commit update information. -# It also blocks tags that aren't annotated. -# Called by git-receive-pack with arguments: refname sha1-old sha1-new -# -# To enable this hook: -# (1) change the recipient e-mail address -# (2) make this file executable by "chmod +x update". -# - -project=$(cat $GIT_DIR/description) -recipients="commit-list@somewhere.com commit-list@somewhereelse.com" - -ref_type=$(git cat-file -t "$3") - -# Only allow annotated tags in a shared repo -# Remove this code to treat dumb tags the same as everything else -case "$1","$ref_type" in -refs/tags/*,commit) - echo "*** Un-annotated tags are not allowed in this repo" >&2 - echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." - exit 1;; -refs/tags/*,tag) - echo "### Pushing version '${1##refs/tags/}' to the masses" >&2 - # recipients="release-announce@somwehere.com announce@somewhereelse.com" - ;; -esac - -# set this to 'cat' to get a very detailed listing. -# short only kicks in when an annotated tag is added -short='git shortlog' - -# see 'date --help' for info on how to write this -# The default is a human-readable iso8601-like format with minute -# precision ('2006-01-25 15:58 +0100' for example) -date_format="%F %R %z" - -(if expr "$2" : '0*$' >/dev/null -then - # new ref - case "$1" in - refs/tags/*) - # a pushed and annotated tag (usually) means a new version - tag="${1##refs/tags/}" - if [ "$ref_type" = tag ]; then - eval $(git cat-file tag $3 | \ - sed -n '4s/tagger \([^>]*>\)[^0-9]*\([0-9]*\).*/tagger="\1" ts="\2"/p') - date=$(date --date="1970-01-01 00:00:00 $ts seconds" +"$date_format") - echo "Tag '$tag' created by $tagger at $date" - git cat-file tag $3 | sed -n '5,$p' - echo - fi - prev=$(git describe "$3^" | sed 's/-g.*//') - # the first tag in a repo will yield no $prev - if [ -z "$prev" ]; then - echo "Changes since the dawn of time:" - git rev-list --pretty $3 | $short - else - echo "Changes since $prev:" - git rev-list --pretty $prev..$3 | $short - echo --- - git diff $prev..$3 | diffstat -p1 - echo --- - fi - ;; - - refs/heads/*) - branch="${1##refs/heads/}" - echo "New branch '$branch' available with the following commits:" - git-rev-list --pretty "$3" $(git-rev-parse --not --all) - ;; - esac -else - base=$(git-merge-base "$2" "$3") - case "$base" in - "$2") - git diff "$3" "^$base" | diffstat -p1 - echo - echo "New commits:" - ;; - *) - echo "Rebased ref, commits from common ancestor:" - ;; - esac - git-rev-list --pretty "$3" "^$base" -fi) | -mail -s "$project: Changes to '${1##refs/heads/}'" $recipients -exit 0 |