* Update hook in Cygwin
@ 2006-03-08 12:16 Niklas Höglund
2006-03-08 13:36 ` Andreas Ericsson
0 siblings, 1 reply; 4+ messages in thread
From: Niklas Höglund @ 2006-03-08 12:16 UTC (permalink / raw)
To: git
Hi.
After creating a couple of repositories and pushing and cloning them,
I get the following:
$ git push --all origin
...
hooks/update: line 88: mail: command not found
This is in cygwin. I'm rather glad I don't have the mail command
installed, as I don't want mails going anywhere.
The update hook contains the following comment:
# To enable this hook:
# (1) change the recipient e-mail address
# (2) make this file executable by "chmod +x update".
But my impression after a cursory look at it is that it would always
call "mail" whenever it is run, and since all files are executable in
Windows (AFAIK), it would always be run.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Update hook in Cygwin
2006-03-08 12:16 Update hook in Cygwin Niklas Höglund
@ 2006-03-08 13:36 ` Andreas Ericsson
2006-03-08 14:44 ` Shawn Pearce
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Ericsson @ 2006-03-08 13:36 UTC (permalink / raw)
To: Niklas Höglund; +Cc: git
Niklas Höglund wrote:
> Hi.
>
> After creating a couple of repositories and pushing and cloning them,
> I get the following:
>
> $ git push --all origin
> ...
> hooks/update: line 88: mail: command not found
>
> This is in cygwin. I'm rather glad I don't have the mail command
> installed, as I don't want mails going anywhere.
>
> The update hook contains the following comment:
>
> # To enable this hook:
> # (1) change the recipient e-mail address
> # (2) make this file executable by "chmod +x update".
>
> But my impression after a cursory look at it is that it would always
> call "mail" whenever it is run, and since all files are executable in
> Windows (AFAIK), it would always be run.
I was under the impression that the cygwin abstraction layer had some
unixy permission thing on top of NTFS. Perhaps that's wrong. If you
remove the hook it won't be called.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Update hook in Cygwin
2006-03-08 13:36 ` Andreas Ericsson
@ 2006-03-08 14:44 ` Shawn Pearce
2006-03-08 15:54 ` Christopher Faylor
0 siblings, 1 reply; 4+ messages in thread
From: Shawn Pearce @ 2006-03-08 14:44 UTC (permalink / raw)
To: Andreas Ericsson; +Cc: Niklas Höglund, git
Andreas Ericsson <ae@op5.se> wrote:
> Niklas Höglund wrote:
> >Hi.
> >
> >After creating a couple of repositories and pushing and cloning them,
> >I get the following:
> >
> >$ git push --all origin
> >...
> >hooks/update: line 88: mail: command not found
> >
> >This is in cygwin. I'm rather glad I don't have the mail command
> >installed, as I don't want mails going anywhere.
> >
> >The update hook contains the following comment:
> >
> ># To enable this hook:
> ># (1) change the recipient e-mail address
> ># (2) make this file executable by "chmod +x update".
> >
> >But my impression after a cursory look at it is that it would always
> >call "mail" whenever it is run, and since all files are executable in
> >Windows (AFAIK), it would always be run.
>
>
> I was under the impression that the cygwin abstraction layer had some
> unixy permission thing on top of NTFS. Perhaps that's wrong. If you
> remove the hook it won't be called.
I've seen the same thing with the hooks on Cywin. I would consider
it to be a bug in either GIT or Cygwin but I haven't decided
which yet.
If you look at the share/git-core/templates directory on a real
UNIX system would see that the hooks are not marked executable by
default when installed. They are copied non-executable into each
new repository by git-init-db. Since they aren't executable they
don't get run.
But on Cygwin the hooks appear to be getting installed and are marked
executable in share/git-core/templates. So when git-init-db copies
them over to the new repository they are by default enabled.
Removing the execute bit from the files in share/git-core/templates
doesn't help; for some reason git-init-db is still copying them with
the execute bit enabled. I haven't spent the time to figure out why
yet; so I just run rm .git/hooks/* on every repository I come across.
BTW: chmod a-x .git/hooks/* also works as the Cygwin unixy permission
layer will remember the change.
--
Shawn.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Update hook in Cygwin
2006-03-08 14:44 ` Shawn Pearce
@ 2006-03-08 15:54 ` Christopher Faylor
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Faylor @ 2006-03-08 15:54 UTC (permalink / raw)
To: Andreas Ericsson, Niklas H?glund, Shawn Pearce, git
On Wed, Mar 08, 2006 at 09:44:13AM -0500, Shawn Pearce wrote:
>BTW: chmod a-x .git/hooks/* also works as the Cygwin unixy permission
>layer will remember the change.
Using "chmod a-x" should work like linux as long as you're using an NTFS
filesystem and have not specifically turned off Cygwin's handling of this
kind of thing with the CYGWIN=nontsec environment variable.
i.e., it should work in most cases on W2K+
cgf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-03-08 15:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-08 12:16 Update hook in Cygwin Niklas Höglund
2006-03-08 13:36 ` Andreas Ericsson
2006-03-08 14:44 ` Shawn Pearce
2006-03-08 15:54 ` Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).