From f123e6ac7088820ee7b5cd5c7632683b67bd8c7f Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Wed, 12 Nov 2008 22:28:12 -0600 Subject: [PATCH] Filling in docs. --- server/post-receive-commitnumbers | 16 ++++++++++++++++ server/post-receive-email | 11 ++++++----- server/post-receive-gitconfig | 12 ++++++++++++ server/update-ensure-follows | 7 +++++++ server/update-lock-check | 4 ++-- 5 files changed, 43 insertions(+), 7 deletions(-) diff --git a/server/post-receive-commitnumbers b/server/post-receive-commitnumbers index 364618b..7bd130a 100644 --- a/server/post-receive-commitnumbers +++ b/server/post-receive-commitnumbers @@ -1,4 +1,20 @@ #!/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 diff --git a/server/post-receive-email b/server/post-receive-email index 8d5d5c8..cea8bfb 100755 --- a/server/post-receive-email +++ b/server/post-receive-email @@ -7,11 +7,12 @@ # 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 # ------ diff --git a/server/post-receive-gitconfig b/server/post-receive-gitconfig index c80322a..46ab3e4 100644 --- a/server/post-receive-gitconfig +++ b/server/post-receive-gitconfig @@ -1,4 +1,16 @@ #!/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 diff --git a/server/update-ensure-follows b/server/update-ensure-follows index 65fb021..779fa9d 100644 --- a/server/update-ensure-follows +++ b/server/update-ensure-follows @@ -8,6 +8,13 @@ # 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 diff --git a/server/update-lock-check b/server/update-lock-check index 098dc16..46931c2 100644 --- a/server/update-lock-check +++ b/server/update-lock-check @@ -1,8 +1,8 @@ #!/bin/sh - +# # # Checks $GIT_DIR/locked and $GIT_DIR/preserved for branches that cannot be -# touched. +# changed or deleted, respectively. # . $(dirname $0)/functions -- 2.20.1