# Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries

5 messages from 2017-03-30 to 2017-03-31. Participants: Nate Mueller, Junio C Hamano, Jeff King.
Thread: https://gitlist.dev/t/45559

## Nate Mueller, 2017-03-30 22:39

Subject: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries
Message-ID: <CAJF7t-dqSa7tmQqNEWmg_VZ=+832nsZ-3JmSGA03qK6aY5eNTQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAJF7t-dqSa7tmQqNEWmg_VZ%3D%2B832nsZ-3JmSGA03qK6aY5eNTQ%40mail.gmail.com

```
I ran into this after upgrading to 2.11.0 through Xcode.  I assumed it
was a packaging issue but it looks like it's been in the mainline
since 1073094f30 (on October 29).

In 2.11.0, git-sh-setup switched it's call of git-sh-i18n from:

. git-sh-i18n

to:

. "$(git --exec-path)/git-sh-i18n"

This fails for me because my GIT_EXEC_PATH is set to
"/Library/Developer/CommandLineTools/usr/libexec/git-core:/Users/nate/.git-exec".
If I remove the second entry git-sh-setup works just fine.

Am I doing something wrong here?  I can't see what but I'm surprised
that I'm the first person to hit this.



-- 
Nate Mueller - Head of Engineering - RetailNext - 406-356-6283

```

## Junio C Hamano, 2017-03-30 22:57

Subject: Re: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries
Message-ID: <xmqqo9wi1ifw.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqo9wi1ifw.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <CAJF7t-dqSa7tmQqNEWmg_VZ=+832nsZ-3JmSGA03qK6aY5eNTQ@mail.gmail.com>

```
Nate Mueller <nate@retailnext.net> writes:

> This fails for me because my GIT_EXEC_PATH is set to
> "/Library/Developer/CommandLineTools/usr/libexec/git-core:/Users/nate/.git-exec".

That environment variable is designed to hold a single path, not
like $PATH that lists multiple places in a colon separated list.

```

## Nate Mueller, 2017-03-30 23:00

Subject: Re: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries
Message-ID: <CAJF7t-cAtR9yp2184pUsw+w3mf-SSMW4FUY27N8+f=6u7qjx3g@mail.gmail.com>
URL: https://gitlist.dev/e/CAJF7t-cAtR9yp2184pUsw%2Bw3mf-SSMW4FUY27N8%2Bf%3D6u7qjx3g%40mail.gmail.com
In-Reply-To: <xmqqo9wi1ifw.fsf@gitster.mtv.corp.google.com>

```
Really?  My config has been set this way for years and it's never
caused problems before.  I have subcommands in both of those
directories and all work.

On Thu, Mar 30, 2017 at 3:57 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Nate Mueller <nate@retailnext.net> writes:
>
>> This fails for me because my GIT_EXEC_PATH is set to
>> "/Library/Developer/CommandLineTools/usr/libexec/git-core:/Users/nate/.git-exec".
>
> That environment variable is designed to hold a single path, not
> like $PATH that lists multiple places in a colon separated list.



-- 
Nate Mueller - Head of Engineering - RetailNext - 406-356-6283

```

## Jeff King, 2017-03-30 23:32

Subject: Re: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries
Message-ID: <20170330233228.dfv5mxnwlppghmua@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20170330233228.dfv5mxnwlppghmua%40sigill.intra.peff.net
In-Reply-To: <CAJF7t-cAtR9yp2184pUsw+w3mf-SSMW4FUY27N8+f=6u7qjx3g@mail.gmail.com>

```
On Thu, Mar 30, 2017 at 04:00:41PM -0700, Nate Mueller wrote:

> Really?  My config has been set this way for years and it's never
> caused problems before.  I have subcommands in both of those
> directories and all work.

Really. It did happen to work most of the time before (because most uses
involved just appending it to $PATH). But it was never intended to work
with multiple paths. The:

  . "$(git --exec-path)/git-sh-whatever"

advice has been advertised in the documentation for years. E.g., see
bd870878f (Documentation: don't assume git-sh-setup and git-parse-remote
are in PATH, 2008-06-29). So even if we wanted to relax the rules in our
scripts, it seems like a potential hazard for 3rd party scripts.

The recommended way is to just put your ~/.git-exec into your $PATH.

-Peff

```

## Nate Mueller, 2017-03-31 00:39

Subject: Re: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries
Message-ID: <CAJF7t-cvCN1wMN1FzNPTG5zOC-d1g0GNxL-necZF7BOfUyrKog@mail.gmail.com>
URL: https://gitlist.dev/e/CAJF7t-cvCN1wMN1FzNPTG5zOC-d1g0GNxL-necZF7BOfUyrKog%40mail.gmail.com
In-Reply-To: <20170330233228.dfv5mxnwlppghmua@sigill.intra.peff.net>

```
Got it.  Thanks!

On Thu, Mar 30, 2017 at 4:32 PM, Jeff King <peff@peff.net> wrote:
> On Thu, Mar 30, 2017 at 04:00:41PM -0700, Nate Mueller wrote:
>
>> Really?  My config has been set this way for years and it's never
>> caused problems before.  I have subcommands in both of those
>> directories and all work.
>
> Really. It did happen to work most of the time before (because most uses
> involved just appending it to $PATH). But it was never intended to work
> with multiple paths. The:
>
>   . "$(git --exec-path)/git-sh-whatever"
>
> advice has been advertised in the documentation for years. E.g., see
> bd870878f (Documentation: don't assume git-sh-setup and git-parse-remote
> are in PATH, 2008-06-29). So even if we wanted to relax the rules in our
> scripts, it seems like a potential hazard for 3rd party scripts.
>
> The recommended way is to just put your ~/.git-exec into your $PATH.
>
> -Peff



-- 
Nate Mueller - Head of Engineering - RetailNext - 406-356-6283

```
