git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Mar 23, 2019, 06:38 UTC
Message-ID
<20190323063827.GA9227@sigill.intra.peff.net>
In-Reply-To
<nycvar.QRO.7.76.6.1903221436590.41@tvgsbejvaqbjf.bet>
On Fri, Mar 22, 2019 at 02:39:43PM +0100, Johannes Schindelin wrote:
Show 7 quoted lines
> 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
> fresh clone. So you'll have to cope with that contingency.

Oh, that's much more clever than mine. I did wonder if it would require the containing directory to be writable, but it seems that "--edit" does not do the usual lock-and-rename.

-Peff
Previous: Johannes Schindelin
Message 6 of 6 in “How to properly find git config in a libgit.a-using executable?”
  1. Mike HommeyMar 20, 2019
  2. Jeff KingMar 22, 2019
  3. Johannes SchindelinMar 22, 2019
  4. Mike HommeyMar 22, 2019
  5. Johannes SchindelinMar 25, 2019
  6. Jeff KingMar 23, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.