- Apr 16, 2013
-
-
When using "git commit --amend" to edit a merge commit message the MERGE_HEAD is long gone. Also, some Git versions remove this file before the commit-msg hook is called. In either case we should still allow long summary lines that start in 'Merge ' just as we do for 'Revert '.
-
- Apr 04, 2013
- Oct 10, 2012
-
-
Some hooks were getting referenced directly via $GIT_DIR/hooks while at other times getting referenced relative via ${BASH_SOURCE%/*}. By making all references relative then these hooks can reside in a different folder and still be daisy-chained by other hooks.
-
- Feb 29, 2012
-
-
Brad King authored
Although it seems reasonable to expect GIT_DIR to be set when hooks are invoked, the "git help hooks" documentation does not guarantee it. On msysGit 1.7.8 (and perhaps others) "git gui" runs prepare-commit-msg without setting GIT_DIR. Set GIT_DIR at the beginning of each commit hook if it is not already set.
-
- Oct 06, 2011
-
-
Brad King authored
Look for a ".hooks-config.bash" file at the top of the work tree. Load it in each hook to get per-project configuration. Currently we do not define any config options, but this adds the framework.
-
- Jan 13, 2011
-
-
Brad King authored
-
- Jan 11, 2011
-
-
Brad King authored
Once our temporary COMMIT_MSG file has been removed do not advise the author to use the file to continue editing the message.
-
- Dec 30, 2010
-
-
Brad King authored
Gerrit recognizes the Change-Id line only if it appears in the footer.
-
- Nov 17, 2010
-
-
Brad King authored
Revert commits always have longer first lines than the commit they revert. Do not reject those that happen to go over the threshold. It is much simpler if the "git revert" command creates the commit without error.
-
- Nov 16, 2010
-
-
Brad King authored
Chain the pre-commit, commit-msg, and prepare-commit-msg hooks to locally configured scripts. Interpret relative paths with respect to the working directory where the hooks run (top of work tree). This allows project setup scripts to add project-specific checks for each of these hooks.
-
- Sep 14, 2010
-
-
Brad King authored
Merge commits can have long subject lines because they name other branches. Accept such messages as a special case for merge commits.
-
- Aug 31, 2010
-
-
Brad King authored
-
- Aug 30, 2010
- Aug 27, 2010
- Aug 03, 2010
-
-
On Solaris, where /bin/sh is actually sh, not bash, some expressions like $() are not supported. Git's own scripts on this machine are configured to use "#!/bin/bash". Change our shebang line to #!/usr/bin/env bash which should work almost everywhere.
-
- Jun 16, 2010
-
-
Brad King authored
-
- Apr 28, 2010
-
-
Brad King authored
Stop processing the commit message text at a "diff --git" line. Such lines occur when the user commits with the "-v" option. We should not check the patch content; it will be stripped by Git anyway.
-
- Apr 22, 2010
-
-
Brad King authored
Store a backup copy of the input message. Remove the backup only on success. On failure, tell the user how to use and edit the message without having to enter it from scratch.
-
- Mar 31, 2010
-
-
Brad King authored
These hooks perform some basic commit-time checks to keep history clean.
-