Git Log


Commit Date  
[090fc1] (hooks) (11.0 kB) by Brad King Brad King

pre-commit: Add check for CRLF even without trailing whitespace

When .gitattributes disables trailing whitespace checks we still
want to avoid allowing CRLF newlines from entering the repository.
Add an explicit check for them.

2013-05-02 20:02:35 View
Download
[0d9698] (10.7 kB) by Brad King Brad King

Load project-specific "start" hooks before our checks

Read from the project ".hooks-config" a configuration value

hooks.start.commit-msg
hooks.start.pre-commit
hooks.start.prepare-commit-msg

to run from our respective hook before its main checks.

2013-04-04 17:48:59 View
Download
[2d9ee2] (10.6 kB) by Brad King Brad King

hooks-config: Subsume hooks-chain functionality

Remove hooks-chain.bash and place its content in hooks-config.bash.

2013-04-04 17:12:19 View
Download
[646b89] (10.6 kB) by Chuck Atkins Chuck Atkins , pushed by Brad King Brad King

Make all hook references relative to thier location

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.

2012-10-10 14:53:23 View
Download
[5ebbe2] (10.6 kB) by Brad King Brad King

Set GIT_DIR if not already set

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.

2012-02-29 21:26:33 View
Download
[4b2beb] (10.6 kB) by Matt McCormick Matt McCormick , pushed by Brad King Brad King

Remove pre-commit-style.

These pre-commit hooks where added to the ITK specific hook chain since all
projects do not use them.

Change-Id: Ifcb41645374914c4f30f7c5f2feb2e5d40a4b3e3

2011-10-21 17:52:49 View
Download
[389c11] (10.7 kB) by Matt McCormick Matt McCormick , pushed by Brad King Brad King

Remove .txx pre-commit check.

This is an ITK specific check. It is already implemented in
the ITK Utilities/Hooks/pre-commit script executed in the hook chain.

This should allow commiting when on the ITK release branch where .txx
files still currently exist.

Change-Id: I1115a2129beb89d6657d599aa6e72bb6515dfca3

2011-10-21 17:39:39 View
Download
[18358a] (10.6 kB) by Brad King Brad King

Load local hooks configuration from work tree

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.

2011-10-06 21:56:05 View
Download
[e8180f] (10.6 kB) by Brad King Brad King

pre-commit: Remove KWStyle and uncrustify support

These checks can be added in projects that want them using the
pre-commit hook chaining.

2011-10-06 17:34:51 View
Download
[f059ba] (11.3 kB) by Matt McCormick Matt McCormick , pushed by David Cole David Cole

ENH: pre-commit: Prevent add .txx files.

A transition occurred in the toolkit to move all .txx files to .hxx files.
This prevents accidental additions of or renames to .txx files.

Change-Id: Id4ace9cfca2c56506d93396366d146173e015003

2011-07-16 00:39:30 View
Download
[bc6d41] (10.7 kB) by Brad King Brad King

pre-commit: Disallow submodule rewind

Reject commits that rewind a submodule relative to any parent (HEAD or
MERGE_HEAD).

2011-01-26 18:56:06 View
Download
[f635fa] (9.3 kB) by Brad King Brad King

pre-commit: Allow merged submodule updates

If "git merge" brings in a submodule update then allow it without
requiring the extra step added in commit 48e72dd1 (Check submodules
staged with other changes, 2010-08-10).

2011-01-26 18:47:38 View
Download
[5d4166] (9.0 kB) by Brad King Brad King

Update copyright notices for year 2011

2011-01-13 20:33:33 View
Download
[c3d0b7] (9.0 kB) by Brad King Brad King

pre-commit: Add whitespace check "no-lf-at-eol"

2010-12-30 14:11:38 View
Download
[f56022] (8.7 kB) by Brad King Brad King

pre-commit: Generalize custom whitespace check

Lookup the whitespace attribute for each modified file and dispatch
custom checks as necessary. Currently the only custom check is the
approximate tab-in-indent check for Git < 1.7.2.

2010-12-30 14:08:10 View
Download
[dc31be] (8.6 kB) by Brad King Brad King

Chain to script configured by "hooks.chain-<hook>"

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.

2010-11-16 22:40:16 View
Download
[d5bb07] (8.4 kB) by Matt McCormick (thewtex) Matt McCormick (thewtex)

pre-commit: Apply uncrustify and KWStyle check for modified files.

uncrustify (uncrustify.sourceforge.net) is applied to changed files prior to
commit.

This feature is off by default. To enable this behavior, set

git config hooks.uncrustify true

By default, the behavior of git-mergetool is used to review the changes
uncrustify makes before they are added to the commit. For more information on
this behavior, see

git help mergetool

KWStyle is run on the changed C++ files and the commit is aborted if the files
do not pass the test. A file similar to the original is saved with a '*.kws'
extension so that line numbers referenced in the error message can be examined.

The test is off by default. To enable this behavoir, set

git config hooks.KWStyle true

Project specific uncrustify and KWStyle configuration files are set with 'git
config'. For example,

git config hooks.uncrustify.conf path/to/uncrustify.conf
git config hooks.KWStyle.conf path/to/KWStyle.conf
git config hooks.KWStyle.overwriteRulesConf path/to/overwrite.conf # optional

If the appropriate values have not been set, die() is called. An
optional KWStyle overwrite rules file can also been configured.

The files on which to run the style checks must also be identified in the
repository's '.gitattributes'. For example,

*.h hooks.style
*.cpp hooks.style

Or, to only enable a subset of style hooks,

*.h hooks.style=KWStyle
*.cpp hooks.style=KWStyle,uncrustify

Change-Id: Ia6b2d4136af3002eb0ec5d36f03c50df928917f4

2010-09-09 16:45:14 View
Download
[19f86e] (8.2 kB) by Brad King Brad King

pre-commit: Allow submodule check to be disabled

If hooks.submodule is 'false' disable all checks. If an individual
hooks.<module>.update is 'true' then accept any update for that module.
Leave these options out of the hints printed. Developers that know what
they are doing will be able to find them by reading the hook source.

2010-09-15 13:22:03 View
Download
[e368fa] (7.9 kB) by Brad King Brad King

pre-commit: Approximate Git 1.7.2 tab-in-indent check

Check for leading TABs in files marked with the whitespace=tab-in-indent
attribute instead of hard-coding a list of file extensions.

2010-08-30 14:02:42 View
Download
[19ee71] (8.0 kB) by Brad King Brad King

Add Apache 2.0 LICENSE and copyright NOTICE

2010-08-27 20:43:57 View
Download
[aad245] (7.3 kB) by Brad King Brad King

Remove out-dated instructions

2010-08-27 20:41:32 View
Download
[0c6925] (7.3 kB) by Brad King Brad King

pre-commit: Allow .gitattributes to limit file size

Check for a 'hooks.MaxObjectKiB' attribute to set the limit of specific
files or patterns.

2010-08-25 15:50:53 View
Download
[48e72d] (6.0 kB) by Brad King Brad King

pre-commit: Check submodules staged with other changes

Since Git does not automatically update submodule checkouts when
checking out a new version in the work tree, it is common to have
locally modified submodule references. Therefore it is easy to stage
such modifications with other changes by accident, especially with
commands like "git add -u" or "git commit -a". The result is almost
always wrong if the submodule change is not intended.

Prevent such mistakes by requiring an extra step to commit submodule
link updates with other changes. When this case is detected, print a
message describing the situation and provide cut-and-paste instructions
to proceed.

2010-08-10 21:30:06 View
Download
[8653d2] (4.1 kB) by Gaëtan Lehmann Gaëtan Lehmann , pushed by Brad King Brad King

Reference bash explicitly in shebang lines

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.

2010-08-03 15:00:14 View
Download
[1387c7] (4.1 kB) by Brad King Brad King

pre-commit: Check file size always

Fix logic to call check_size for all updated index entries, not just
those whose mode changed.

2010-06-07 18:07:38 View
Download
Older >

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks