Commit Graph

13 Commits

Author SHA1 Message Date
noah the goodra
8c14d8bae5 added a special check to the pre-hook to output to file
this change adds an if statement to the pre-hook that will either dump the diff into the terminal if its less then or equal to 30 charaters or will write it to a temp file and tell the user where said file is so they can read the fixes.
this helps if the user is using something like an ide. examples would include clion,possibly netbeans,and visual studio.
The issue is that the prehook output doesnt get dumped into a full terminal (in the case of clion anyway) and ends up being obstructed by the ui of the ide product.
2017-01-31 14:45:16 -06:00
noah the goodra
45b3b36c4a added check for each platform 2017-01-31 10:06:58 -06:00
noah the goodra
b69e33a0d6 changed the shebang line 2017-01-30 15:53:35 -06:00
noah the goodra
4b96671c8f fixed a typo 2017-01-30 15:53:35 -06:00
noah the goodra
b3184dfb33 fixed the prehook on osx 2017-01-30 15:53:35 -06:00
Jan Beich
3925f4ff63 hooks: convert pre-commit to POSIX syntax 2016-10-27 23:28:29 +00:00
Ricardo de Almeida Gonzaga
13d46f6820 Fix typos 2016-10-20 12:26:59 -02:00
Emmanuel Gil Peyrot
362659f009 Git hook: Remove trailing semicolons wrecking vim’s syntax highlighting. 2016-09-18 09:36:57 +09:00
Emmanuel Gil Peyrot
491f5bab88 Git hook: Import Dolphin’s clang-format hook. 2016-09-18 09:36:57 +09:00
Yuri Kunde Schlesner
37319fb17f Only check src/ directory for whitespace errors in the pre-commit hook
This allows importing of external libraries into externals/ without
having to reformat them. Unfortunately it also allows whitespace to be
introduced in files like the root CMakeLists.txt, but that is a small
downside compared to the tradeoff.
2015-08-31 07:12:25 -03:00
JSFernandes
256eb24777 Fix permissions in pre-commit hook 2015-07-14 00:58:18 +01:00
Lectem
499171ca64 enforce config from hook 2015-06-14 00:29:56 +02:00
Lectem
85183a702a force no-tab/trailing spaces with git hook
Remove unneeded stuff from pre-commit script

The check against an empty commit was not needed (it is only a security for the 1st commit after git init).
It could also possibly pose problems because of the redirection to /dev/null on some windows systems.

newline at EOF & fixed indent
2015-06-09 19:59:39 +02:00