Re: How to properly find git config in a libgit.a-using executable?

2019-03-25 Thread Johannes Schindelin
Hi Mike, On Fri, 22 Mar 2019, Mike Hommey wrote: > On Fri, Mar 22, 2019 at 02:39:43PM +0100, Johannes Schindelin wrote: > > Hi Peff & Mike, > > > > On Fri, 22 Mar 2019, Jeff King wrote: > > > > > On Wed, Mar 20, 2019 at 07:19:41PM +0900, Mike Hommey wrote: > > > > > > > I thought of a few options

Re: How to properly find git config in a libgit.a-using executable?

2019-03-22 Thread Jeff King
On Fri, Mar 22, 2019 at 02:39:43PM +0100, Johannes Schindelin wrote: > How about > > GIT_EDITOR=echo git config --system -e 2>/dev/null > > It will error out if the directory does not exist, for some reason, e.g. > when you installed Git in your home directory via `make install` from a > f

Re: How to properly find git config in a libgit.a-using executable?

2019-03-22 Thread Mike Hommey
On Fri, Mar 22, 2019 at 02:39:43PM +0100, Johannes Schindelin wrote: > Hi Peff & Mike, > > On Fri, 22 Mar 2019, Jeff King wrote: > > > On Wed, Mar 20, 2019 at 07:19:41PM +0900, Mike Hommey wrote: > > > > > I thought of a few options (it's worth noting the helper is invoked in a > > > way that mak

Re: How to properly find git config in a libgit.a-using executable?

2019-03-22 Thread Johannes Schindelin
Hi Peff & Mike, On Fri, 22 Mar 2019, Jeff King wrote: > On Wed, Mar 20, 2019 at 07:19:41PM +0900, Mike Hommey wrote: > > > I thought of a few options (it's worth noting the helper is invoked in a > > way that makes $GIT_EXEC_PATH set, which can help a little): > > - spawn `$GIT_EXEC_PATH/git-conf

Re: How to properly find git config in a libgit.a-using executable?

2019-03-22 Thread Jeff King
On Wed, Mar 20, 2019 at 07:19:41PM +0900, Mike Hommey wrote: > I thought of a few options (it's worth noting the helper is invoked in a > way that makes $GIT_EXEC_PATH set, which can help a little): > - spawn `$GIT_EXEC_PATH/git-config -l -z`, parse its output, and set the > internal config from

How to properly find git config in a libgit.a-using executable?

2019-03-20 Thread Mike Hommey
Hi, In git-cinnabar (the remote-helper that can talk to mercurial servers), I'm using a fast-import-derived helper to do a lot of the heavy lifting, because $REASONS. Anyways, while built (mostly) with the git build system, using libgit.a, etc. the helper doesn't live in the GIT_EXEC_PATH. That le