From 9aca104a0f04072cf28643a5d5be6b372b0612e2 Mon Sep 17 00:00:00 2001 From: "szager@chromium.org" Date: Fri, 28 Dec 2012 20:58:26 +0000 Subject: [PATCH] git template files for chromium checkouts. To be used in conjunction with the --template argument to git-clone. The hooks all redirect to build/git-hooks, which are files under revision control. This allows us to version the hooks along with the source code. TBR=mmoss@chromium.org,cmp@chromium.org Review URL: https://codereview.chromium.org/11689005 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@174738 0039d316-1c4b-4281-b951-d872f2087c98 --- git-templates/description | 3 +++ git-templates/hooks/applypatch-msg | 4 ++++ git-templates/hooks/commit-msg | 4 ++++ git-templates/hooks/post-applypatch | 4 ++++ git-templates/hooks/post-checkout | 4 ++++ git-templates/hooks/post-commit | 4 ++++ git-templates/hooks/post-merge | 4 ++++ git-templates/hooks/post-update | 4 ++++ git-templates/hooks/pre-applypatch | 4 ++++ git-templates/hooks/pre-auto-gc | 4 ++++ git-templates/hooks/pre-commit | 4 ++++ git-templates/hooks/pre-rebase | 4 ++++ git-templates/hooks/prepare-commit-msg | 4 ++++ git-templates/info/exclude | 6 ++++++ 14 files changed, 57 insertions(+) create mode 100644 git-templates/description create mode 100755 git-templates/hooks/applypatch-msg create mode 100755 git-templates/hooks/commit-msg create mode 100755 git-templates/hooks/post-applypatch create mode 100755 git-templates/hooks/post-checkout create mode 100755 git-templates/hooks/post-commit create mode 100755 git-templates/hooks/post-merge create mode 100755 git-templates/hooks/post-update create mode 100755 git-templates/hooks/pre-applypatch create mode 100755 git-templates/hooks/pre-auto-gc create mode 100755 git-templates/hooks/pre-commit create mode 100755 git-templates/hooks/pre-rebase create mode 100755 git-templates/hooks/prepare-commit-msg create mode 100644 git-templates/info/exclude diff --git a/git-templates/description b/git-templates/description new file mode 100644 index 0000000000..96196cffb2 --- /dev/null +++ b/git-templates/description @@ -0,0 +1,3 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. diff --git a/git-templates/hooks/applypatch-msg b/git-templates/hooks/applypatch-msg new file mode 100755 index 0000000000..bc62ba94b6 --- /dev/null +++ b/git-templates/hooks/applypatch-msg @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/applypatch-msg" ] && exec bash "build/git-hooks/applypatch-msg" "$@" +exit 0 diff --git a/git-templates/hooks/commit-msg b/git-templates/hooks/commit-msg new file mode 100755 index 0000000000..6d4ef8878c --- /dev/null +++ b/git-templates/hooks/commit-msg @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/commit-msg" ] && exec bash "build/git-hooks/commit-msg" "$@" +exit 0 diff --git a/git-templates/hooks/post-applypatch b/git-templates/hooks/post-applypatch new file mode 100755 index 0000000000..9f970733ef --- /dev/null +++ b/git-templates/hooks/post-applypatch @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/post-applypatch" ] && exec bash "build/git-hooks/post-applypatch" "$@" +exit 0 diff --git a/git-templates/hooks/post-checkout b/git-templates/hooks/post-checkout new file mode 100755 index 0000000000..2579434357 --- /dev/null +++ b/git-templates/hooks/post-checkout @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/post-checkout" ] && exec bash "build/git-hooks/post-checkout" "$@" +exit 0 diff --git a/git-templates/hooks/post-commit b/git-templates/hooks/post-commit new file mode 100755 index 0000000000..6b1c6c90ea --- /dev/null +++ b/git-templates/hooks/post-commit @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/post-commit" ] && exec bash "build/git-hooks/post-commit" "$@" +exit 0 diff --git a/git-templates/hooks/post-merge b/git-templates/hooks/post-merge new file mode 100755 index 0000000000..7065306312 --- /dev/null +++ b/git-templates/hooks/post-merge @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/post-merge" ] && exec bash "build/git-hooks/post-merge" "$@" +exit 0 diff --git a/git-templates/hooks/post-update b/git-templates/hooks/post-update new file mode 100755 index 0000000000..b0fe1c52a4 --- /dev/null +++ b/git-templates/hooks/post-update @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/post-update" ] && exec bash "build/git-hooks/post-update" "$@" +exit 0 diff --git a/git-templates/hooks/pre-applypatch b/git-templates/hooks/pre-applypatch new file mode 100755 index 0000000000..c37aa4add5 --- /dev/null +++ b/git-templates/hooks/pre-applypatch @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/pre-applypatch" ] && exec bash "build/git-hooks/pre-applypatch" "$@" +exit 0 diff --git a/git-templates/hooks/pre-auto-gc b/git-templates/hooks/pre-auto-gc new file mode 100755 index 0000000000..0b87a0f80b --- /dev/null +++ b/git-templates/hooks/pre-auto-gc @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/pre-auto-gc" ] && exec bash "build/git-hooks/pre-auto-gc" "$@" +exit 0 diff --git a/git-templates/hooks/pre-commit b/git-templates/hooks/pre-commit new file mode 100755 index 0000000000..f5ea25c811 --- /dev/null +++ b/git-templates/hooks/pre-commit @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/pre-commit" ] && exec bash "build/git-hooks/pre-commit" "$@" +exit 0 diff --git a/git-templates/hooks/pre-rebase b/git-templates/hooks/pre-rebase new file mode 100755 index 0000000000..dd01fddce5 --- /dev/null +++ b/git-templates/hooks/pre-rebase @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/pre-rebase" ] && exec bash "build/git-hooks/pre-rebase" "$@" +exit 0 diff --git a/git-templates/hooks/prepare-commit-msg b/git-templates/hooks/prepare-commit-msg new file mode 100755 index 0000000000..c761996635 --- /dev/null +++ b/git-templates/hooks/prepare-commit-msg @@ -0,0 +1,4 @@ +#!/bin/bash + +[ -e "build/git-hooks/prepare-commit-msg" ] && exec bash "build/git-hooks/prepare-commit-msg" "$@" +exit 0 diff --git a/git-templates/info/exclude b/git-templates/info/exclude new file mode 100644 index 0000000000..a5196d1be8 --- /dev/null +++ b/git-templates/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~