#!/bin/sh
+#
+# Creates commitnumbers as lightweight tags named "r/X" where X increases
+# monotonically.
+#
+# Works by creating a GIT_DIR/commitnumbers file that is a list of all
+# commit SHA1s where the commitnumber == the line number of the SHA1 in the
+# file.
+#
+# If you're adding commitnumbers to an existing repo, you can jump start it
+# (without the tags, but so you don't start at 0), by:
+#
+# git rev-list --all > $GIT_DIR/commitnumbers
+#
+# There is no real reason the tags are named "r/X"--feel free to substitute your
+# own prefix or drop it all together. That should probably be a config variable.
+#
. $(dirname $0)/functions
# the change being reported. The rule is that (for branch updates) each commit
# will appear on one email and one email only.
#
-# This hook script assumes it is enabled on the central repository of a
-# project, with all users pushing only to it and not between each other. It
-# will still work if you don't operate in that style, but it would become
-# possible for the email to be from someone other than the person doing the
-# push.
+# Differences from the contrib script (off the top of my head):
+#
+# * Sends combined diff output which is great for viewing merge commits
+# * Changes order of commit listing to be oldest to newest
+# * Configurable sendmail path
+# * Use git describe --tags for the email subject to pick up commitnumbers
#
# Config
# ------
#!/bin/sh
+#
+# Auto-deploys the contents of the gitconfig branch to $GIT_DIR.
+#
+# The config file is handled specially--instead of the $GIT_DIR's config file
+# being copied over entirely, the gitconfig:config is evaluated line by line
+# with calls to `git config`. This means you can have settings in
+# $GIT_DIR/config that are not in the gitconfig:config and they will not be
+# overwritten. Deleting $GIT_DIR/config entries has to be manually.
+#
+# Hooks are copied over entirely, but old ones are not deleted. Deleting
+# existing hooks has to be done manually.
+#
while read oldrev newrev refname ; do
if [ "$refname" == "refs/heads/gitconfig" ] ; then
# they are qa'ing will always have the last stable release
# in it.
#
+# Config
+# ------
+# hooks.update-ensure-follows.branches
+# Space-separated list of branches that other branches must merge with
+# hooks.update-ensure-follows.excused
+# Space-separated list of branches that are excused from following (e.g. gitconfig)
+#
. $(dirname $0)/functions
#!/bin/sh
-
+#
#
# Checks $GIT_DIR/locked and $GIT_DIR/preserved for branches that cannot be
-# touched.
+# changed or deleted, respectively.
#
. $(dirname $0)/functions