Re: Multiple paths in GIT_EXEC_PATH

2017-10-24 Thread Dennis Kaarsemaker
ing > $HOME and git repositories being stores for my different configs) That is solvable without needing multiple directories in $GIT_EXEC_PATH. vcsh, which also solves the 'multiple repos with same workdir' problem in a very thin wrapper around git, does this by setting core.excludesfile in

Re: Multiple paths in GIT_EXEC_PATH

2017-10-17 Thread Junio C Hamano
Kevin Daudt writes: > The commit that changed what you described is 1073094f3 (git-sh-setup: > be explicit where to dot-source git-sh-i18n from., 2016-10-29). That > commit claims there were already scripts that assumed GIT_EXEC_PATH is > just a single entry. That commit was inclu

Re: Multiple paths in GIT_EXEC_PATH

2017-10-17 Thread Kevin Daudt
On Tue, Oct 17, 2017 at 06:21:22PM +0300, Nikolay Yakimov wrote: > Hello. After updating to a recent git release (2.14, I believe, but > possibly earlier), setting GIT_EXEC_PATH to multiple directories > stopped working. It did work before, and I believe the culprit is > 'git-sh-s

Multiple paths in GIT_EXEC_PATH

2017-10-17 Thread Nikolay Yakimov
Hello. After updating to a recent git release (2.14, I believe, but possibly earlier), setting GIT_EXEC_PATH to multiple directories stopped working. It did work before, and I believe the culprit is 'git-sh-setup', which uses 'git --exec-path' output directly, while most

Re: GIT_EXEC_PATH

2017-04-18 Thread Kevin Daudt
On Tue, Apr 18, 2017 at 01:47:14PM +0200, Christoph Egger wrote: > Hi! > > Concerning $GIT_EXEC_PATH .. is that supposed to be a $PATh like variable? as > in can it have more than one path (colon-separated)? I have currently two > directories there (one with a git-annex install

GIT_EXEC_PATH

2017-04-18 Thread Christoph Egger
Hi! Concerning $GIT_EXEC_PATH .. is that supposed to be a $PATh like variable? as in can it have more than one path (colon-separated)? I have currently two directories there (one with a git-annex installation, one with the normal git stuff) and it seems to mostly work. However git-sh-setup is

Re: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries

2017-03-30 Thread Nate Mueller
Got it. Thanks! On Thu, Mar 30, 2017 at 4:32 PM, Jeff King 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. >

Re: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries

2017-03-30 Thread Jeff King
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 inv

Re: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries

2017-03-30 Thread Nate Mueller
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 wrote: > Nate Mueller writes: > >> This fails for me because my GIT_EX

Re: Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries

2017-03-30 Thread Junio C Hamano
Nate Mueller 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.

Issue with 2.11.0 and GIT_EXEC_PATH with multiple entries

2017-03-30 Thread Nate Mueller
-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 surpris

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-09 Thread Stefan Beller
"recently fixed" problems) > commit c9bb5d101ca657fa466afa8c4368c43ea7b7aca8 > Author: Johannes Schindelin > Date: Mon Jan 2 17:22:33 2017 +0100 > > git_exec_path: avoid Coverity warning about unfree()d result > > Technically, it is correct that git_exec_p

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-08 Thread Johannes Schindelin
2 17:22:33 2017 +0100 > > git_exec_path: avoid Coverity warning about unfree()d result > > Technically, it is correct that git_exec_path() returns a possibly > malloc()ed string returned from system_path(), and it is sometimes > not allocated. Cache the result in a s

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-08 Thread Jeff King
t think it's a big deal to do it on top, like this: -- >8 -- Subject: git_exec_path: do not return the result of getenv() The result of getenv() is not guaranteed by POSIX to last beyond another call to getenv(), or setenv(), etc. We should duplicate the string before returning to the caller

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-08 Thread Junio C Hamano
Stefan Beller writes: > On Mon, Jan 2, 2017 at 8:22 AM, Johannes Schindelin > wrote: >> Technically, it is correct that git_exec_path() returns a possibly >> malloc()ed string. Practically, it is *sometimes* not malloc()ed. So >> let's just use a static variable to

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-04 Thread Stefan Beller
On Tue, Jan 3, 2017 at 1:33 PM, Johannes Schindelin wrote: > > This patch was originally only to appease Coverity, but it actually *does* > plug a very real memory leak: previously, *every* call to git_exec_path() > *possibly* returned a newly-malloc()ed buffer. Now, the first call

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-04 Thread Johannes Schindelin
Hi Stefan, On Tue, 3 Jan 2017, Stefan Beller wrote: > On Mon, Jan 2, 2017 at 8:22 AM, Johannes Schindelin > wrote: > > Technically, it is correct that git_exec_path() returns a possibly > > malloc()ed string. Practically, it is *sometimes* not malloc()ed. So > > let'

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-03 Thread Jeff King
On Tue, Jan 03, 2017 at 12:11:25PM -0800, Stefan Beller wrote: > On Mon, Jan 2, 2017 at 8:22 AM, Johannes Schindelin > wrote: > > Technically, it is correct that git_exec_path() returns a possibly > > malloc()ed string. Practically, it is *sometimes* not malloc()ed. So &g

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-03 Thread Stefan Beller
On Mon, Jan 2, 2017 at 8:22 AM, Johannes Schindelin wrote: > Technically, it is correct that git_exec_path() returns a possibly > malloc()ed string. Practically, it is *sometimes* not malloc()ed. So > let's just use a static variable to make it a singleton. That'll shut >

[PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-02 Thread Johannes Schindelin
Technically, it is correct that git_exec_path() returns a possibly malloc()ed string. Practically, it is *sometimes* not malloc()ed. So let's just use a static variable to make it a singleton. That'll shut Coverity up, hopefully. Signed-off-by: Johannes Schindelin --- exec_cmd.c |