Thread (6 messages) flat view 6 messages, 4 authors, 2021-08-23

Re: [PATCH] Give support for hooks based on platform

From: brian m. carlson <hidden>
Date: 2021-08-22 22:07:50

On 2021-08-21 at 23:11:27, Rafael Santiago wrote:
In my opinion "binary hooks" (hooks that execute specific binaries not
present in the system as a default tool) should be versioned and built
as a support tool into the repository or in the worst case downloaded
from somewhere, even because versioning binaries into git repos is
considered a bad practice that could make bloated repos.
Yes, I agree binary hooks should not be checked into the repository.
The point is that in many cases a dependency with a script language is
created only to make the hook actions portable from a platform to
other, but what this script in its essence does is a thing that could
be done with basic tools delivered with the current operating system.
Then, in general, it can be done in a shell script containing an if-then
statement per platform using the native tools, so I'm not seeing the
particular reason that this series is necessary if the hooks being
executed aren't binaries.  All systems on which Git runs must contain a
POSIX-compatible shell.

Can you explain the rationale for your proposal in more detail so that
we can understand why this change is necessary?  Typically this is done
in the commit message, but I don't think I understand why you want to do
this.
There is no problem on using cygwin on windows, you should use
standard hook and do all the effort to make it unique for cygwin
environments and true unix boxes (in other words: you would continue
doing what you are doing, because it attends yours requirements).
Notice that everything that have been working will stay working as
before. Anyway, if cygwin becomes a point of incompatibility at some
point, you could use the "_windows" version by coding your "cygwin
script" there.
Right, my point is that your commit message proposes using "windows" for
Cygwin.  The patch doesn't, but your commit message says that every
version of Windows is considered "windows".
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help