[Libreoffice-commits] .: git-hooks/artwork.git git-hooks/base.git git-hooks/binfilter.git git-hooks/bootstrap.git git-hooks/build.git git-hooks/calc.git git-hooks/components.git git-hooks/contrib git-hooks/core.git git-hooks/cppunit.git git-hooks/dictionaries.git git-hooks/extensions.git git-hooks/extras.git git-hooks/filters.git git-hooks/help.git git-hooks/impress.git git-hooks/install git-hooks/l10n.git git-hooks/libcdr.git git-hooks/libexttextcat.git git-hooks/libmspub.git git-hooks/libs-core.git git-hooks/libs-extern.git git-hooks/libs-extern-sys.git git-hooks/libs-gui.git git-hooks/lightproof.git git-hooks/original-artwork.git git-hooks/postprocess.git git-hooks/README git-hooks/sdk.git git-hooks/templates.git git-hooks/testing.git git-hooks/translations.git git-hooks/ugly.git git-hooks/ure.git git-hooks/voting.git git-hooks/website.git git-hooks/writer.git
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Feb 15 01:50:14 PST 2013
git-hooks/README | 8 +
git-hooks/artwork.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/base.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/binfilter.git/hooks/update | 139 +++++++++++++++++++++++
git-hooks/bootstrap.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/build.git/hooks/update | 125 +++++++++++++++++++++
git-hooks/calc.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/components.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/contrib/buildbot.git/hooks/update | 115 +++++++++++++++++++
git-hooks/contrib/dev-tools.git/hooks/update | 139 +++++++++++++++++++++++
git-hooks/contrib/gitdm-config.git/hooks/update | 107 ++++++++++++++++++
git-hooks/contrib/libvisio.git/hooks/update | 139 +++++++++++++++++++++++
git-hooks/contrib/mso-dumper.git/hooks/update | 125 +++++++++++++++++++++
git-hooks/contrib/ooeclipse.git/hooks/update | 137 +++++++++++++++++++++++
git-hooks/contrib/svn-to-git.git/hooks/update | 137 +++++++++++++++++++++++
git-hooks/contrib/test-files.git/hooks/update | 117 ++++++++++++++++++++
git-hooks/core.git/hooks/update | 140 ++++++++++++++++++++++++
git-hooks/cppunit.git/hooks/update | 139 +++++++++++++++++++++++
git-hooks/dictionaries.git/hooks/update | 140 ++++++++++++++++++++++++
git-hooks/extensions.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/extras.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/filters.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/help.git/hooks/update | 140 ++++++++++++++++++++++++
git-hooks/impress.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/install | 32 +++++
git-hooks/l10n.git/hooks/update | 125 +++++++++++++++++++++
git-hooks/libcdr.git/hooks/update | 140 ++++++++++++++++++++++++
git-hooks/libexttextcat.git/hooks/update | 139 +++++++++++++++++++++++
git-hooks/libmspub.git/hooks/update | 140 ++++++++++++++++++++++++
git-hooks/libs-core.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/libs-extern-sys.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/libs-extern.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/libs-gui.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/lightproof.git/hooks/update | 107 ++++++++++++++++++
git-hooks/original-artwork.git/hooks/update | 139 +++++++++++++++++++++++
git-hooks/postprocess.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/sdk.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/templates.git/hooks/update | 139 +++++++++++++++++++++++
git-hooks/testing.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/translations.git/hooks/update | 140 ++++++++++++++++++++++++
git-hooks/ugly.git/hooks/update | 107 ++++++++++++++++++
git-hooks/ure.git/hooks/update | 134 ++++++++++++++++++++++
git-hooks/voting.git/hooks/update | 140 ++++++++++++++++++++++++
git-hooks/website.git/hooks/update | 140 ++++++++++++++++++++++++
git-hooks/writer.git/hooks/update | 134 ++++++++++++++++++++++
45 files changed, 5747 insertions(+)
New commits:
commit 76ffd99073eafc8fb27fec9fe0a31a241820c577
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri Feb 15 10:35:43 2013 +0100
Import current git server hooks
See README on why this is a good idea.
Change-Id: I81f44fbab5c77fb51baddb47597dad6cbe4df90d
diff --git a/git-hooks/README b/git-hooks/README
new file mode 100644
index 0000000..1b01a42
--- /dev/null
+++ b/git-hooks/README
@@ -0,0 +1,8 @@
+This directory contains the git 'update' hooks, which are executed on the
+fdo server after each push. They are responsible for sending out mails to the
+-commits list, and also prevent directly pushing changes to fdo, when the
+read-write repo is hosted on gerrit.
+
+If you review a change on gerrit, affecting a hook in this directly, please do
+it only in case you update the real hook on the fdo server as well. The
+'install' script should make this easy for you. Thanks!
diff --git a/git-hooks/artwork.git/hooks/update b/git-hooks/artwork.git/hooks/update
new file mode 100755
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/artwork.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/base.git/hooks/update b/git-hooks/base.git/hooks/update
new file mode 100755
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/base.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/binfilter.git/hooks/update b/git-hooks/binfilter.git/hooks/update
new file mode 100755
index 0000000..ee45708
--- /dev/null
+++ b/git-hooks/binfilter.git/hooks/update
@@ -0,0 +1,139 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+
+project=$(cat $GIT_DIR/description)
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# Avoid re-introducing obsolete tags
+if grep -q "^$1$" hooks/obsolete-tags; then
+ echo "*** Re-introducing an obsolete tag ($1) is not allowed in this repo" >&2
+ echo "*** Use corereleasebranches/killtagslocal.sh from contrib/dev-tools.git to get rid of them." >&2
+ exit 1
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" \
+ -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" $recipients
+exit 0
diff --git a/git-hooks/bootstrap.git/hooks/update b/git-hooks/bootstrap.git/hooks/update
new file mode 100755
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/bootstrap.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/build.git/hooks/update b/git-hooks/build.git/hooks/update
new file mode 100755
index 0000000..c0a47ab
--- /dev/null
+++ b/git-hooks/build.git/hooks/update
@@ -0,0 +1,125 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/calc.git/hooks/update b/git-hooks/calc.git/hooks/update
new file mode 100755
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/calc.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/components.git/hooks/update b/git-hooks/components.git/hooks/update
new file mode 100755
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/components.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/contrib/buildbot.git/hooks/update b/git-hooks/contrib/buildbot.git/hooks/update
new file mode 100755
index 0000000..c935005
--- /dev/null
+++ b/git-hooks/contrib/buildbot.git/hooks/update
@@ -0,0 +1,115 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+
+project=$(cat $GIT_DIR/description)
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+fi
+
+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
+ 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 "$3" "^$base" | while read rev; do git-show $rev; done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/contrib/dev-tools.git/hooks/update b/git-hooks/contrib/dev-tools.git/hooks/update
new file mode 100755
index 0000000..944c06b
--- /dev/null
+++ b/git-hooks/contrib/dev-tools.git/hooks/update
@@ -0,0 +1,139 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+
+project=$(cat $GIT_DIR/description)
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# Avoid re-introducing obsolete tags
+if grep -q "^$1$" hooks/obsolete-tags; then
+ echo "*** Re-introducing an obsolete tag ($1) is not allowed in this repo" >&2
+ echo "*** Use corereleasebranches/killtagslocal.sh from contrib/dev-tools.git to get rid of them." >&2
+ exit 1
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/libreoffice/libcdr.git" \
+ -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" $recipients
+exit 0
diff --git a/git-hooks/contrib/gitdm-config.git/hooks/update b/git-hooks/contrib/gitdm-config.git/hooks/update
new file mode 100644
index 0000000..4b69268
--- /dev/null
+++ b/git-hooks/contrib/gitdm-config.git/hooks/update
@@ -0,0 +1,107 @@
+#!/bin/sh
+#
+# An example hook script to blocks unannotated tags from entering.
+# Called by git-receive-pack with arguments: refname sha1-old sha1-new
+#
+# To enable this hook, make this file executable by "chmod +x update".
+#
+# Config
+# ------
+# hooks.allowunannotated
+# This boolean sets whether unannotated tags will be allowed into the
+# repository. By default they won't be.
+# hooks.allowdeletetag
+# This boolean sets whether deleting tags will be allowed in the
+# repository. By default they won't be.
+# hooks.allowdeletebranch
+# This boolean sets whether deleting branches will be allowed in the
+# repository. By default they won't be.
+#
+
+# --- Command line
+refname="$1"
+oldrev="$2"
+newrev="$3"
+
+# --- Safety check
+if [ -z "$GIT_DIR" ]; then
+ echo "Don't run this script from the command line." >&2
+ echo " (if you want, you could supply GIT_DIR then run" >&2
+ echo " $0 <ref> <oldrev> <newrev>)" >&2
+ exit 1
+fi
+
+if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
+ echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
+ exit 1
+fi
+
+# --- Config
+allowunannotated=$(git config --bool hooks.allowunannotated)
+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
+allowdeletetag=$(git config --bool hooks.allowdeletetag)
+
+# check for no description
+projectdesc=$(sed -e '1q' "$GIT_DIR/description")
+if [ -z "$projectdesc" -o "$projectdesc" = "Unnamed repository; edit this file to name it for gitweb." ]; then
+ echo "*** Project description file hasn't been set" >&2
+ exit 1
+fi
+
+# --- Check types
+# if $newrev is 0000...0000, it's a commit to delete a ref.
+if [ "$newrev" = "0000000000000000000000000000000000000000" ]; then
+ newrev_type=delete
+else
+ newrev_type=$(git-cat-file -t $newrev)
+fi
+
+case "$refname","$newrev_type" in
+ refs/tags/*,commit)
+ # un-annotated tag
+ short_refname=${refname##refs/tags/}
+ if [ "$allowunannotated" != "true" ]; then
+ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
+ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
+ exit 1
+ fi
+ ;;
+ refs/tags/*,delete)
+ # delete tag
+ if [ "$allowdeletetag" != "true" ]; then
+ echo "*** Deleting a tag is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/tags/*,tag)
+ # annotated tag
+ ;;
+ refs/heads/*,commit)
+ # branch
+ ;;
+ refs/heads/*,delete)
+ # delete branch
+ if [ "$allowdeletebranch" != "true" ]; then
+ echo "*** Deleting a branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/remotes/*,commit)
+ # tracking branch
+ ;;
+ refs/remotes/*,delete)
+ # delete tracking branch
+ if [ "$allowdeletebranch" != "true" ]; then
+ echo "*** Deleting a tracking branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ *)
+ # Anything else (is there anything else?)
+ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
+ exit 1
+ ;;
+esac
+
+# --- Finished
+exit 0
diff --git a/git-hooks/contrib/libvisio.git/hooks/update b/git-hooks/contrib/libvisio.git/hooks/update
new file mode 100755
index 0000000..336996a
--- /dev/null
+++ b/git-hooks/contrib/libvisio.git/hooks/update
@@ -0,0 +1,139 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+
+project=$(cat $GIT_DIR/description)
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# Avoid re-introducing obsolete tags
+if grep -q "^$1$" hooks/obsolete-tags; then
+ echo "*** Re-introducing an obsolete tag ($1) is not allowed in this repo" >&2
+ echo "*** Use corereleasebranches/killtagslocal.sh from contrib/dev-tools.git to get rid of them." >&2
+ exit 1
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/libreoffice/contrib/libvisio.git" \
+ -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" $recipients
+exit 0
diff --git a/git-hooks/contrib/mso-dumper.git/hooks/update b/git-hooks/contrib/mso-dumper.git/hooks/update
new file mode 100755
index 0000000..c0a47ab
--- /dev/null
+++ b/git-hooks/contrib/mso-dumper.git/hooks/update
@@ -0,0 +1,125 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/contrib/ooeclipse.git/hooks/update b/git-hooks/contrib/ooeclipse.git/hooks/update
new file mode 100755
index 0000000..0f4aa75
--- /dev/null
+++ b/git-hooks/contrib/ooeclipse.git/hooks/update
@@ -0,0 +1,137 @@
+#!/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="ooeclipse"
+recipients="ooo-build-commit at freedesktop.org"
+basedir=`basename $GIT_DIR .git`
+# that didn't work --anholt
+basedir=ooeclipse
+
+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/remotes*,*)
+ echo "*** You cannot push a remote reference." >&2
+ exit 1;;
+refs/heads/origin*,*)
+ echo "*** You cannot push an 'origin' branch!" >&2
+ exit 1;;
+refs/tags/*,tag)
+ echo "### Pushing version '${1##refs/tags/}' to the masses" >&2
+ # recipients="release-announce at somwehere.com announce at somewhereelse.com"
+ ;;
+refs/heads/*,commit)
+ if [ "$2" = "0000000000000000000000000000000000000000" ]; then
+ revspec="$3"
+ elif [ "$3 " = "0000000000000000000000000000000000000000" ]; then
+ revspec=""
+ else
+ revspec="$2..$3"
+ fi
+ if test -n "$revspec" && git shortlog "$revspec" | grep -q 'DO NOT PUSH'; then
+ echo "*** Commits marked do not push!" >&2
+ git shortlog "$revspec" | grep 'DO NOT PUSH' >&2
+ exit 1
+ fi
+ ;;
+esac
+
+if [ "$1" = "refs/heads/server-1.2-branch" ]; then
+ echo "*** server-1.2-branch is dead: please use server-1.3-branch instead." >&2
+ exit 1
+fi
+
+# 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=3
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+# this is excessively noisy, removed - ajax
+# subject=$(git-diff-tree -r --name-only "$base" "$3" |
+# cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits ${subject:+- ${subject}}"
+ fi
+ branch="${1##refs/heads/}"
+ subject="Branch '$branch' ${subject:+- ${subject}}"
+fi
+
+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 --abbrev=0 "$3^")
+
+ # 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
+ 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 "$3" "^$base" | while read rev; do git-show $rev; done
+fi |
+mail -s "$basedir: $subject" $recipients
+exit 0
diff --git a/git-hooks/contrib/svn-to-git.git/hooks/update b/git-hooks/contrib/svn-to-git.git/hooks/update
new file mode 100644
index 0000000..f741df7
--- /dev/null
+++ b/git-hooks/contrib/svn-to-git.git/hooks/update
@@ -0,0 +1,137 @@
+#!/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="svn-to-git"
+recipients="ooo-build-commit at freedesktop.org"
+basedir=`basename $GIT_DIR .git`
+# that didn't work --anholt
+basedir=svn-to-git
+
+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/remotes*,*)
+ echo "*** You cannot push a remote reference." >&2
+ exit 1;;
+refs/heads/origin*,*)
+ echo "*** You cannot push an 'origin' branch!" >&2
+ exit 1;;
+refs/tags/*,tag)
+ echo "### Pushing version '${1##refs/tags/}' to the masses" >&2
+ # recipients="release-announce at somwehere.com announce at somewhereelse.com"
+ ;;
+refs/heads/*,commit)
+ if [ "$2" = "0000000000000000000000000000000000000000" ]; then
+ revspec="$3"
+ elif [ "$3 " = "0000000000000000000000000000000000000000" ]; then
+ revspec=""
+ else
+ revspec="$2..$3"
+ fi
+ if test -n "$revspec" && git shortlog "$revspec" | grep -q 'DO NOT PUSH'; then
+ echo "*** Commits marked do not push!" >&2
+ git shortlog "$revspec" | grep 'DO NOT PUSH' >&2
+ exit 1
+ fi
+ ;;
+esac
+
+if [ "$1" = "refs/heads/server-1.2-branch" ]; then
+ echo "*** server-1.2-branch is dead: please use server-1.3-branch instead." >&2
+ exit 1
+fi
+
+# 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=3
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+# this is excessively noisy, removed - ajax
+# subject=$(git-diff-tree -r --name-only "$base" "$3" |
+# cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits ${subject:+- ${subject}}"
+ fi
+ branch="${1##refs/heads/}"
+ subject="Branch '$branch' ${subject:+- ${subject}}"
+fi
+
+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 --abbrev=0 "$3^")
+
+ # 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
+ 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 "$3" "^$base" | while read rev; do git-show $rev; done
+fi |
+mail -s "$basedir: $subject" $recipients
+exit 0
diff --git a/git-hooks/contrib/test-files.git/hooks/update b/git-hooks/contrib/test-files.git/hooks/update
new file mode 100755
index 0000000..e58517f
--- /dev/null
+++ b/git-hooks/contrib/test-files.git/hooks/update
@@ -0,0 +1,117 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+
+
+project="LibreOffice test files"
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+
+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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+fi
+
+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
+ 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 "$3" "^$base" | while read rev; do git-show $rev; done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://git.cairographics.org/git/cairo" $recipients
+exit 0
diff --git a/git-hooks/core.git/hooks/update b/git-hooks/core.git/hooks/update
new file mode 100755
index 0000000..d1df79b
--- /dev/null
+++ b/git-hooks/core.git/hooks/update
@@ -0,0 +1,140 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+from="$(git show -s --pretty=format:'%an <%ae>' $3^{})"
+
+project=$(cat $GIT_DIR/description)
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# Avoid re-introducing obsolete tags
+if grep -q "^$1$" hooks/obsolete-tags; then
+ echo "*** Re-introducing an obsolete tag ($1) is not allowed in this repo" >&2
+ echo "*** Use corereleasebranches/killtagslocal.sh from contrib/dev-tools.git to get rid of them." >&2
+ exit 1
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $(cd $GIT_DIR ; pwd))
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/libreoffice/core.git" \
+ -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" -a "From: $from" $recipients
+exit 0
diff --git a/git-hooks/cppunit.git/hooks/update b/git-hooks/cppunit.git/hooks/update
new file mode 100755
index 0000000..736b3cd
--- /dev/null
+++ b/git-hooks/cppunit.git/hooks/update
@@ -0,0 +1,139 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+
+project=$(cat $GIT_DIR/description)
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# Avoid re-introducing obsolete tags
+if grep -q "^$1$" hooks/obsolete-tags; then
+ echo "*** Re-introducing an obsolete tag ($1) is not allowed in this repo" >&2
+ echo "*** Use corereleasebranches/killtagslocal.sh from contrib/dev-tools.git to get rid of them." >&2
+ exit 1
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/libreoffice/cppunit.git" \
+ -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" $recipients
+exit 0
diff --git a/git-hooks/dictionaries.git/hooks/update b/git-hooks/dictionaries.git/hooks/update
new file mode 100755
index 0000000..d1df79b
--- /dev/null
+++ b/git-hooks/dictionaries.git/hooks/update
@@ -0,0 +1,140 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+from="$(git show -s --pretty=format:'%an <%ae>' $3^{})"
+
+project=$(cat $GIT_DIR/description)
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# Avoid re-introducing obsolete tags
+if grep -q "^$1$" hooks/obsolete-tags; then
+ echo "*** Re-introducing an obsolete tag ($1) is not allowed in this repo" >&2
+ echo "*** Use corereleasebranches/killtagslocal.sh from contrib/dev-tools.git to get rid of them." >&2
+ exit 1
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $(cd $GIT_DIR ; pwd))
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/libreoffice/core.git" \
+ -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" -a "From: $from" $recipients
+exit 0
diff --git a/git-hooks/extensions.git/hooks/update b/git-hooks/extensions.git/hooks/update
new file mode 100755
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/extensions.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/extras.git/hooks/update b/git-hooks/extras.git/hooks/update
new file mode 100644
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/extras.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/filters.git/hooks/update b/git-hooks/filters.git/hooks/update
new file mode 100755
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/filters.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/help.git/hooks/update b/git-hooks/help.git/hooks/update
new file mode 100755
index 0000000..d1df79b
--- /dev/null
+++ b/git-hooks/help.git/hooks/update
@@ -0,0 +1,140 @@
+#!/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".
+#
+
+# prevent pushing from anyone but the logerrit user
+if [ "$(id -u -n )" != "logerrit" ] ; then
+ echo "*** The reference for this repo is gerrit. do not push directly to fdo" >&2
+ exit 1
+fi
+from="$(git show -s --pretty=format:'%an <%ae>' $3^{})"
+
+project=$(cat $GIT_DIR/description)
+recipients="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# Avoid re-introducing obsolete tags
+if grep -q "^$1$" hooks/obsolete-tags; then
+ echo "*** Re-introducing an obsolete tag ($1) is not allowed in this repo" >&2
+ echo "*** Use corereleasebranches/killtagslocal.sh from contrib/dev-tools.git to get rid of them." >&2
+ exit 1
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $(cd $GIT_DIR ; pwd))
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/libreoffice/core.git" \
+ -a "List-Post: <mailto:libreoffice at lists.freedesktop.org>" -a "From: $from" $recipients
+exit 0
diff --git a/git-hooks/impress.git/hooks/update b/git-hooks/impress.git/hooks/update
new file mode 100755
index 0000000..4714a30
--- /dev/null
+++ b/git-hooks/impress.git/hooks/update
@@ -0,0 +1,134 @@
+#!/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="libreoffice-commits at lists.freedesktop.org"
+
+ref_type=$(git cat-file -t "$3")
+
+# One Git Convertsion: make the master branch read-only
+if [ "$1" = "refs/heads/master" ] ; then
+ echo "*** This repository has been migrated to core.git," >&2
+ echo "*** the 'master' branch is now read-only." >&2
+ echo "*** see http://wiki.documentfoundation.org/Development/One_Git_Conversion" >&2
+ echo "*** for more details" >&2
+ exit 1;
+fi
+
+# 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 at somwehere.com announce at 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"
+
+# Set to the number of pathname components you want in the subject line to
+# indicate which components of a project changed.
+num_path_components=2
+
+# Set subject
+if expr "$2" : '0*$' >/dev/null ; then
+ subject="Changes to '${1##refs/heads/}'"
+else
+ base=$(git-merge-base "$2" "$3")
+ subject=$(git-diff-tree -r --name-only "$base" "$3" |
+ cut -d/ -f-$num_path_components | sort -u | xargs echo -n)
+ commits=$(git-rev-list "$3" "^$base" | wc -l)
+ if [ "$commits" -ne 1 ] ; then
+ subject="$commits commits - $subject"
+ fi
+ branch="${1##refs/heads/}"
+ if [ "$branch" != "master" ] ; then
+ subject="Branch '$branch' - $subject"
+ fi
+ repo=$(basename $GIT_DIR)
+ subject="$repo: $subject"
+fi
+
+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
+ case "$base" in
+ "$2")
+ git diff "$3" "^$base" | diffstat -p1
+ echo
+ echo "New commits:"
+ ;;
+ *)
+ echo "Rebased ref, commits from common ancestor:"
+ ;;
+ esac
+ bytes=0
+ IFS="$(echo)"
+ git-rev-list "$3" "^$base" | while read rev; do git-show $rev; done | sed 's#\\#\\\\#g' |
+ while read line
+ do
+ if [ "$bytes" -ge "0" ] ; then
+ bytes=$(( $bytes + ${#line} + 1 ))
+ if [ "$bytes" -gt "100000" ] ; then
+ bytes=-1
+ echo -e "\n... etc. - the rest is truncated"
+ else
+ echo "$line"
+ fi
+ fi
+ done
+fi |
+mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" $recipients
+exit 0
diff --git a/git-hooks/install b/git-hooks/install
new file mode 100755
index 0000000..020d780
--- /dev/null
+++ b/git-hooks/install
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+die()
+{
+ echo "$@"
+ exit 1
+}
+
+if [ -z "$1" ]; then
+ die "usage: $0 /path/to/git/libreoffice"
+fi
+
+prefix=$1
+
+for i in $(find . -name hooks)
+do
+ for j in $i/*
+ do
+ [ -e $prefix/$j ] || die "$prefix/$j doesn't exists, remove from repo"
+ if ! diff -q -u $j $prefix/$j; then
+ if [ ! -w $prefix/$j ]; then
+ echo "$prefix/$j is not writable, skipping"
+ continue
+ fi
+ cat $j > $prefix/$j
+ else
+ echo "$prefix/$j is up to date"
+ fi
+ done
+done
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/git-hooks/l10n.git/hooks/update b/git-hooks/l10n.git/hooks/update
new file mode 100755
index 0000000..c0a47ab
--- /dev/null
+++ b/git-hooks/l10n.git/hooks/update
@@ -0,0 +1,125 @@
+#!/bin/sh
+#
+# An example hook script to mail out commit update information.
+# It also blocks tags that aren't annotated.
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list