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

Re: General support for ! in git-config values

From
Jeff King <peff@peff.net>
Date
Feb 3, 2012, 12:09 UTC
Message-ID
<20120203120936.GC31441@sigill.intra.peff.net>
In-Reply-To
<CAGZ=bq++R+X+2r2_zQ4UZ6JvDC9W9_4nF23MQ6+612_Qe2RS4Q@mail.gmail.com>
On Thu, Feb 02, 2012 at 09:08:46PM -0800, Kyle Moffett wrote:
Show 15 quoted lines
> > I understand. I think we will probably use backtick quoting in git-deploy. So
> >
> > deploy.prefix=`cat /etc/SERVER_ROLE`
> >
> > will execute cat /etc/SERVER_ROLE and use the results as the value of
> > the config option.
> 
> Alternatively, you could extend the recent proposal for GIT config
> "include" statements so that something like this works:
> 
> [include]
>     exec = echo "deploy.prefix = `cat /etc/SERVER_ROLE`"
>     exec = /usr/local/bin/git-config-for-ldap-user
> 
> Thoughts?

I am still undecided on whether the utility of the idea is worth the potential hassle, but syntactically I like that better. It does put a little more burden on the called program to handle things like quoting, though.

-Peff
Previous: Jeff KingNext: Junio C Hamano
Message 18 of 20 in “General support for ! in git-config values”
  1. Ævar Arnfjörð BjarmasonFeb 1, 2012
  2. Jeff KingFeb 1, 2012
  3. Ævar Arnfjörð BjarmasonFeb 1, 2012
  4. Junio C HamanoFeb 1, 2012
  5. demerphqFeb 2, 2012
  6. Junio C HamanoFeb 2, 2012
  7. demerphqFeb 2, 2012
  8. Junio C HamanoFeb 2, 2012
  9. demerphqFeb 2, 2012
  10. Jeff KingFeb 2, 2012
  11. demerphqFeb 2, 2012
  12. Jeff KingFeb 2, 2012
  13. demerphqFeb 2, 2012
  14. Kyle MoffettFeb 3, 2012
  15. Junio C HamanoFeb 3, 2012
  16. Kyle MoffettFeb 3, 2012
  17. Jeff KingFeb 3, 2012
  18. Jeff KingFeb 3, 2012
  19. Junio C HamanoFeb 2, 2012
  20. demerphqFeb 2, 2012

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.