threads / discuss / 22768

git-* in hook scripts

Subject: git-* in hook scripts

## tl;dr

4 messages between Feb 23, 2010 and Feb 25, 2010.

replies: 3people: 3as markdown or json

Eli Barzilay· Feb 23, 2010, 16:33 UTC · lore

There are several sample hook scripts that use `git-*' -- should these use `git *' instead?

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
Miklos Vajna· Feb 23, 2010, 23:59 UTC · re: Eli Barzilay · lore

Re: git-* in hook scripts

On Tue, Feb 23, 2010 at 11:33:36AM -0500, Eli Barzilay <eli@barzilay.org> wrote:
> There are several sample hook scripts that use `git-*' -- should these
> use `git *' instead?

No need to do so, `git --exec-path` is already in PATH when those scripts are invoked.

Junio C Hamano· Feb 24, 2010, 00:32 UTC · re: Miklos Vajna · lore

Re: git-* in hook scripts

Miklos Vajna <vmiklos@frugalware.org> writes:
Show 6 quoted lines
> On Tue, Feb 23, 2010 at 11:33:36AM -0500, Eli Barzilay <eli@barzilay.org> wrote:
>> There are several sample hook scripts that use `git-*' -- should these
>> use `git *' instead?
>
> No need to do so, `git --exec-path` is already in PATH when those
> scripts are invoked.

We have been waiting until nobody remembers days we had dashes. It may be a good time to at least start thinking about updating them. v1.6.0 is one year and half old.

Eli Barzilay· Feb 25, 2010, 07:15 UTC · re: Miklos Vajna · lore

Re: git-* in hook scripts

Miklos Vajna <vmiklos@frugalware.org> writes:
Show 6 quoted lines
> On Tue, Feb 23, 2010 at 11:33:36AM -0500, Eli Barzilay <eli@barzilay.org> wrote:
>> There are several sample hook scripts that use `git-*' -- should
>> these use `git *' instead?
>
> No need to do so, `git --exec-path` is already in PATH when those
> scripts are invoked.

To make this a little more concrete, I was thinking about the fact that `git cmd' can be different from `git-cmd' if I add a file with the second name for one of the builtin commands.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

← back to recent threads