05ea4ac195
and linux-links
This patch improve patch
9afc6b22e2
git-hooks:
overwrite the windows-links not with linux-links
The main problem with the previous patch is that
when an alias is set for git, this alias will not
map in the Shell script passed, better you
use a git-symlink.
The other problem was the behavior of cygwin-bash
and win-git-bash that is not always the same, e.g.
- winlnk=$(cmd /C ... 2>&1) it hang infinity,
line 123
- the 'ln' made not link, it only copy the files
Improving the FOR in ./git-hooks/README, when
you have the copied files, need a other del command
The patch can not set the windows-links, only output
the ./git-hooks/README
But in Win 11 should be possible, it is not needed
admin-rights for the 'mklink' command
Change-Id: Icecdb96e65fe2bba1270dfad2ac1af5af145925a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148462
Tested-by: Jenkins
Reviewed-by: Juergen Funk <juergen.funk_ml@cib.de>
22 lines
763 B
Text
22 lines
763 B
Text
Git hooks are executable scripts you can place in $GIT_DIR/hooks directory to trigger action at certain points.
|
|
|
|
To install manually, run:
|
|
|
|
cd .git/hooks && ln -s ../../.git-hooks/* ./
|
|
|
|
When you using GIT for Windows, you need Windows links
|
|
Open a Dos-Box with admin rights then
|
|
cd .git/hooks
|
|
FOR /F " usebackq " %i IN (`dir /b ..\..\.git-hooks`) DO del /as /f %i & del %i & mklink %i ..\..\.git-hooks\%i
|
|
the error 'Could Not Find ...' can be ignore
|
|
|
|
There are two groups of these hooks: client side and server side.
|
|
|
|
The client-side hooks:
|
|
are for client operations such as committing and merging.
|
|
|
|
The server-side hooks:
|
|
are for Git server operations such as receiving pushed commits.
|
|
|
|
See Also [ http://git-scm.com/book/en/Customizing-Git-Git-Hooks ]
|
|
|