]>
gitweb.fluxo.info Git - git-hooks.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Benjamin C Meyer [Wed, 30 Apr 2014 02:02:24 +0000 (22:02 -0400)]
Merge pull request #36 from Zearin/reorder-func
Did you happen to enable git-hooks in the git-hooks repo? It should have prevented you from making commits that were not signed off on.
Zearin [Mon, 28 Apr 2014 19:07:15 +0000 (15:07 -0400)]
Update `--help` output
* No longer using `--severalunseparatewords` (but still accepts them for backwards compatibility)
* Use `<angled brackets>` for mandatory arguments (`[square brackets]` are for optional arguments)
Zearin [Mon, 28 Apr 2014 19:00:09 +0000 (15:00 -0400)]
Use consistent function names
Zearin [Mon, 28 Apr 2014 18:51:13 +0000 (14:51 -0400)]
Use consistent braces for functions
Zearin [Mon, 28 Apr 2014 18:40:49 +0000 (14:40 -0400)]
Put related functions next to each other
Benjamin C Meyer [Tue, 18 Feb 2014 03:49:23 +0000 (22:49 -0500)]
Don't output error when checking files that have been removed and don't exists.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Tue, 18 Feb 2014 03:25:10 +0000 (22:25 -0500)]
Handle repository paths that contains spaces
Issue #33
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Thu, 5 Dec 2013 02:37:30 +0000 (18:37 -0800)]
Merge pull request #29 from Zearin/patch-1
Updated README to use markdown & edited for grammar, phrasing, and clarity
Tony [Mon, 2 Dec 2013 17:54:52 +0000 (12:54 -0500)]
Updated README to use markdown & edited for grammar, phrasing, and clarity
Benjamin C Meyer [Thu, 7 Nov 2013 03:07:11 +0000 (22:07 -0500)]
Remove .gitignore which was just ignoring vim swap files
which really belong in users global .gitignore file.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Thu, 7 Nov 2013 02:12:26 +0000 (21:12 -0500)]
Add the ability to remind users when committing to any repo without git-hooks.
It is easy to forget to install git-hooks in a repository you are using.
A commit with no error message could both mean you don't have git-hooks
installed and it can mean that you do have it installed, but your
commit was perfect and there was no errors.
The new option --installglobal creates a default .git template
that is used by all future cloned repositories (and git init'd)
that remind users that the repository doesn't have git-hooks
installed.
A number of projects I have been involved with used git-hooks,
but founds its weakest point was that eventually someone would
re-clone a repo and make commits with errors before turning
git-hooks back on. Another common problem was when we had
multiple git repositories and git-hooks was only installed in
some of them, but not all
While it would be nice to be able to use --instalglobal to
automatically turn on git-hooks on every future repo eventually
some git repository on github would include a hook that would
email <secret stuff> back home and all you would have to do
would be to clone it to activate it which would be a "bad thing",
but it can pester you without harm.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Thu, 7 Nov 2013 01:40:06 +0000 (20:40 -0500)]
Behave much better when not in a git repository
or when the repository is a bare repository
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Thu, 24 Oct 2013 03:13:20 +0000 (23:13 -0400)]
Add support for Git on windows where find doesn't have the -L option
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Thu, 24 Oct 2013 03:14:44 +0000 (23:14 -0400)]
If git hooks isn't installed explicitly say how to install it
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Thu, 24 Oct 2013 03:14:03 +0000 (23:14 -0400)]
In the event we can't rename hooks we should immediately fail.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Georg Lutz [Sat, 24 Aug 2013 18:17:11 +0000 (20:17 +0200)]
Fix too many hooks reported in list_hooks_in_dir
list_hooks_in_dir should report exactly the hooks that would be run with
run_hooks. But the find command in list_hooks_in_dir does not limit itself to
the scheme "folder_name/hook_name" but recurses infinitely through sub
directories reporting all executable files. If your hooks are stored itself in
a git repository then consequently also the files in .git/hooks are reported.
This change sets the search depth exactly to two, so that the correct scripts
are reported, e.g. :
~/.git_hooks/commit-msg/script1
but not e.g. :
~/.git_hook/.git/hooks/commit-msg
~/.git_hooks/script2
~/.git_hooks/commit-msg/dir2/script3
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Mon, 21 Oct 2013 02:10:39 +0000 (22:10 -0400)]
Use /usr/bin/env in generated hook scripts
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Mon, 21 Oct 2013 02:06:11 +0000 (22:06 -0400)]
Add support for pre-push commit hook that was added in Git 1.8.2
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Tue, 23 Jul 2013 00:44:34 +0000 (17:44 -0700)]
Merge pull request #18 from mishanga/patch-1
using /usr/bin/env
Mikhail Troshev [Mon, 22 Jul 2013 12:30:13 +0000 (16:30 +0400)]
using /usr/bin/env
bash can be placed in /usr/local/bin on FreeBSD
Benjamin C Meyer [Thu, 7 Feb 2013 02:32:40 +0000 (18:32 -0800)]
Merge pull request #14 from pblack/copyrights_with_entity
Augmenting the copyright_year check to be able to check that a copyright...
Phil Black-Knight [Fri, 1 Feb 2013 20:18:39 +0000 (12:18 -0800)]
Augmenting the copyright_year check to be able to check that a copyright exists for a specific entitfy for the current year.
Benjamin C Meyer [Mon, 9 Apr 2012 11:46:44 +0000 (07:46 -0400)]
Add hook that checks the commit message for hints it should be split.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Mon, 13 Feb 2012 11:31:37 +0000 (03:31 -0800)]
Merge pull request #10 from arikon/master
Fix icefox/git-hooks#9: -L arg to find must precede path to find from
Sergey Belov [Mon, 13 Feb 2012 08:59:40 +0000 (10:59 +0200)]
Fix icefox/git-hooks#9: -L arg to find must precede path to find from
Jeremy Dunck [Tue, 18 Oct 2011 17:55:33 +0000 (10:55 -0700)]
Don't re-install.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 25 Jan 2012 05:49:05 +0000 (00:49 -0500)]
When we find hooks also look for symbolic links.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Oluf Lorenzen [Fri, 10 Dec 2010 19:15:46 +0000 (20:15 +0100)]
Add another standard-help-flag
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 25 Jan 2012 05:37:31 +0000 (00:37 -0500)]
Remove non-posix shell command flags which is causing problems across OS's.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 25 Jan 2012 05:10:16 +0000 (00:10 -0500)]
Fix whitespace errors introduced by
7502217953a8e8e5b56f0a531a16cfc14b825e82
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 25 Jan 2012 05:36:24 +0000 (00:36 -0500)]
Don't turn on set -e until after we test for the presence of aspell.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 25 Jan 2012 05:01:56 +0000 (21:01 -0800)]
Merge pull request #6 from AlekSi/master
Fix --about for signed-off-by hook
Benjamin C Meyer [Wed, 25 Jan 2012 04:08:16 +0000 (23:08 -0500)]
Correct the copyright year and add a LICENSE file.
Alexey Palazhchenko [Sun, 11 Dec 2011 15:23:36 +0000 (19:23 +0400)]
Fix --about for signed-off-by hook.
Benjamin C Meyer [Fri, 16 Sep 2011 14:37:12 +0000 (07:37 -0700)]
Merge pull request #3 from daniel/master
Lion compability fix
Daniel Eriksson [Fri, 16 Sep 2011 09:01:21 +0000 (11:01 +0200)]
Lion compability.
Benjamin C Meyer [Tue, 6 Sep 2011 02:38:45 +0000 (22:38 -0400)]
Change my mind on the previous commit making the new default .githooks
not .hooks to match other .git* files/directories.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Thu, 1 Sep 2011 14:54:29 +0000 (10:54 -0400)]
Fix OS X sort -V breakage
The -V option to sort is not include in OS X's sort so special case OS
X.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Thu, 1 Sep 2011 14:50:02 +0000 (10:50 -0400)]
Include the directory .hooks inside the repository as one of the directories that are searched.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sun, 20 Jun 2010 03:34:16 +0000 (23:34 -0400)]
Revert "Mention the envvar GIT_HOOKS_VERBOSE to help debug hooks that exit with non-zero, but don't output an error"
This reverts commit
536997d6d30467e2e9e401cca2cf6e7daa499665 .
Benjamin C Meyer [Sat, 19 Jun 2010 20:17:26 +0000 (16:17 -0400)]
When listing hooks don't change the cwd, just use the GITDIR variable
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 20:17:03 +0000 (16:17 -0400)]
When listing the hook_dirs use GITDIR for the project hooks
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 20:10:43 +0000 (16:10 -0400)]
When listing hooks use GITDIR and pipe stderr to dev/null
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 20:03:32 +0000 (16:03 -0400)]
If the hooks are installed or not is important, put it on its own line in the output
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 19:59:32 +0000 (15:59 -0400)]
Allow git config path to contain $HOME or other shell variables by expanding them with eval.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 20:01:16 +0000 (16:01 -0400)]
When listing hooks, the dir should always be a dir, so add / to the end of the dir. This allows the dir to be a symlink.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 19:28:26 +0000 (15:28 -0400)]
Tweak introduction sentance to the project to include the three types of hooks.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 18:39:36 +0000 (14:39 -0400)]
When a hook returns with non-zero report which hook last ran before exiting
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 17:54:02 +0000 (13:54 -0400)]
Mention the envvar GIT_HOOKS_VERBOSE to help debug hooks that exit with non-zero, but don't output an error
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 17:32:35 +0000 (13:32 -0400)]
Use rev-parse --git-dir to determine the location of the GITDIR.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 16:56:36 +0000 (12:56 -0400)]
Show explicity how to set the global hooks with the contrib directory as an example.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 16:48:30 +0000 (12:48 -0400)]
Try to clarify some sections of the README file to make it easier to see
what the project does right off the bat and how to get it working.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 16:33:21 +0000 (12:33 -0400)]
Only set the hook variable when an argument is passed to hook_dirs, otherwise hook will be '/' and if there is no git config option will result in / being returned as a valid git hook which it is not
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 16:31:04 +0000 (12:31 -0400)]
When printing the status claify that git-hooks is not installed in the current repository, not in general.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 19 Jun 2010 16:30:09 +0000 (12:30 -0400)]
Change license of all code from the 4 clause license to the 3 clause license
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 20 Mar 2010 21:00:50 +0000 (17:00 -0400)]
Remove variable the is no longer used
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Sat, 20 Mar 2010 20:59:40 +0000 (16:59 -0400)]
Verify that all required arguments are passed in and return with an
error if they are not.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Fri, 19 Mar 2010 07:00:25 +0000 (03:00 -0400)]
Add the most important two hooks to the example list
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Fri, 19 Mar 2010 06:51:58 +0000 (02:51 -0400)]
Write up correct documentation for when git hooks --help is called.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Fri, 19 Mar 2010 06:46:04 +0000 (02:46 -0400)]
Only echo the name of the script and hook if GIT_HOOKS_VERBOSE is set.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Fri, 19 Mar 2010 06:45:15 +0000 (02:45 -0400)]
Display both the hook name and script name
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Fri, 19 Mar 2010 06:38:40 +0000 (02:38 -0400)]
Rather than using an environment variable just use the configuration
option hooks.global.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Fri, 19 Mar 2010 06:11:12 +0000 (02:11 -0400)]
Add a link to the official documentation in the README
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Fri, 19 Mar 2010 06:10:20 +0000 (02:10 -0400)]
Add a pre-receive hook that checks the amount of free space and warns if it is too low.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 06:17:19 +0000 (02:17 -0400)]
Add a new commit-msg hook that checks for duplicate Signed-off-by lines
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 05:54:24 +0000 (01:54 -0400)]
Go through the README file and clarify portions of it.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 05:05:56 +0000 (01:05 -0400)]
Add a section to the README describing how to create hooks
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 04:50:52 +0000 (00:50 -0400)]
Add a new pre-commit hook that checks for the current year in the copyright.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 04:25:29 +0000 (00:25 -0400)]
Add a commit-msg hook that checks that all commits have the Signed-off-by line
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 04:10:08 +0000 (00:10 -0400)]
Add a commit-msg hook that spell checks the commit message.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 04:01:39 +0000 (00:01 -0400)]
Add missing BSD license headers.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 03:52:14 +0000 (23:52 -0400)]
Add a pre-commit hook that checks for the BSD license. This hook only applies to this project.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 03:45:07 +0000 (23:45 -0400)]
Add a pre-commit hook that checks for whitespace errors
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 01:25:05 +0000 (21:25 -0400)]
Add a pre-commit hook that checks bash files for syntax errors
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 04:13:44 +0000 (00:13 -0400)]
Initial stab at the git-hooks script that will run user, application, and global hooks.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Wed, 17 Mar 2010 00:04:00 +0000 (20:04 -0400)]
Ignore swap files
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
Benjamin C Meyer [Mon, 15 Mar 2010 00:31:36 +0000 (20:31 -0400)]
Initial commit
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>