From 05ea4ac1952c546a81781ac0662747dbe6073616 Mon Sep 17 00:00:00 2001 From: Juergen Funk Date: Wed, 8 Mar 2023 10:14:55 +0100 Subject: git-hooks: better handling in './g -z' with win-links and linux-links This patch improve patch 9afc6b22e225e8a6ec50c1cbb4d966585d15dbfd 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 --- .git-hooks/README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.git-hooks') diff --git a/.git-hooks/README b/.git-hooks/README index 5ef9e8e45a48..62a16c1de69e 100644 --- a/.git-hooks/README +++ b/.git-hooks/README @@ -7,7 +7,8 @@ To install manually, run: 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 & mklink %i ..\..\.git-hooks\%i + 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. -- cgit