Re: Your hooks not right, solve this in cygwin with ./g -z

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

"Read first, then ask" :)
My error was, that I have used Windows PowerShell, but the instruction in the README says "Open a Dos-Box with admin rights".

So WindowsKey+R.
Enter cmd and finish with Ctrl+Shift+Enter to get admin rights.
You are now in C:\Windows\System32>
Change to the specified folder .git/hooks
And then run the specified command
FOR /F " usebackq " %i IN (`dir /b ..\..\.git-hooks`) DO del /as /f %i & del %i & mklink %i ..\..\.git-hooks\%i

This replaces each of the four files commit-msg, post-merge, pre-commit and README with something of size 0 KB, that has Type .symlink

Before using the above, I had followed the first part of the instructions in README and run command cd .git/hooks && ln -s ../../.git-hooks/* ./

Now there are no error messages with using make.

Kind regard,
Regina







A option /L would be wrong.


Balázs Varga schrieb am 24.10.2024 um 16:04:
Hi Regina,

I think our g script only works on Cygwin but not in the Git for windows. (I run into the same issue, earlier):

https://opengrok.libreoffice.org/xref/core/g?r=cd013e66&mo=3121&fi=108#108

$ ./g -z

Your hooks not right, solve this in cygwin with

./g -z

Some additional info:

This is because under Windows, common users do not have permission to create links:

https://superuser.com/questions/129299/got-not-sufficient-privileges-message-in-cmd-when-logged-on-as-administrator

.git-hooks/README recommends to run the following as admin:

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

However, if I run this as a common user from cmd with a /J switch added to mklink, that one succeeds and creates the same type of links as cygwin. So integrating this into the g script could help on this issue.


Best,

Balázs



Regina Henschel <rb.henschel@xxxxxxxxxxx <mailto:rb.henschel@xxxxxxxxxxx>> ezt írta (időpont: 2024. okt. 24., Cs, 15:52):

    Hi Michael,

    Michael Weghorn schrieb am 24.10.2024 um 14:20:
     > Hi Regina,
     >
     > On 2024-10-24 00:01, Regina Henschel wrote:
     >> I still on getting build with WSL correct.
     >>
     >> Using command
     >> $ make
     >> I get the error message
     >> Your hooks not right, solve this in cygwin with
     >>     ./g -z
     >>
     >> But I'm not in cygwin and using ./g -z only repeats the error
    message.
     >>
     >> Nevertheless, command make works. Can I ignore this error
    message or
     >> what do I need to do?
     > Does following the steps described in `.git-hooks/README` help?
     > (I'd first try the "GIT for Windows" case for a WSL setup.)

    No, those does not help.

    Kind regards,
    Regina





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux