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

[PATCH v5 0/1] Conditional config include

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Feb 23, 2017, 12:23 UTC
Message-ID
<20170223122346.12222-1-pclouds@gmail.com>

Let's try this again. v4 and before can be found in the original thread [1]. The remaining issues of v4 were

On Fri, Aug 19, 2016 at 8:54 PM, Jeff King <peff@peff.net> wrote:
Show 8 quoted lines
> On Sat, Aug 13, 2016 at 03:40:59PM +0700, Duy Nguyen wrote:
>
>> Ping..
>
> There was some discussion after v4. I think the open issues are:
>
>   - the commit message is rather terse (it should describe motivation,
>     and can refer to the docs for the "how")
Fixed
Show 8 quoted lines
>
>   - the syntax might be more clear as:
>
>        [include-if "gitdir:..."]
>
>     or
>
>        [include "gitdir-is:..."]

I'll go with include-if. It feels a bit awkward to add -is to every new type of condition.

Show 12 quoted lines
>   - there is an open question of whether we would like to go this route,
>     maintaining backwards compatibility syntactically (and thus having
>     these includes quietly skipped in older versions), or introduce a
>     breaking syntax that could be more convenient, like:
>
>       [if-gitdir(...):section]
>       conditional-but-no-include-necessary = true
>
>     I do not have a strong opinion myself, though I had written the
>     original [include] assuming syntactic compatibility, and I think it
>     has worked out (e.g., you can manipulate include.path via "git
>     config" just as you would any other key).

I'll go with the what we have done, at least it's proven not provoking too bad effects. So no breaking syntax.

[1] http://public-inbox.org/git/20160714153311.2166-1-pclouds@gmail.com/
Nguyễn Thái Ngọc Duy (1):
  config: add conditional include
 Documentation/config.txt  |  54 +++++++++++++++++++++++++
 config.c                  | 100 ++++++++++++++++++++++++++++++++++++++++++++++
 t/t1305-config-include.sh |  56 ++++++++++++++++++++++++++
 3 files changed, 210 insertions(+)
-- 
2.11.0.157.gd943d85
Next: Nguyễn Thái Ngọc Duy
Message 1 of 39 in “Conditional config include”
  1. 0/1 Conditional config includeNguyễn Thái Ngọc Duy, Feb 23, 2017
  2. 1/1 config: add conditional includeNguyễn Thái Ngọc Duy, Feb 23, 2017
  3. Junio C HamanoFeb 23, 2017
  4. Duy NguyenFeb 24, 2017
  5. Junio C HamanoFeb 24, 2017
  6. Jeff KingFeb 26, 2017
  7. Junio C HamanoFeb 27, 2017
  8. Stefan BellerMar 6, 2017
  9. Jeff KingMar 7, 2017
  10. Stefan BellerMar 7, 2017
  11. 0/1 Conditional config includeNguyễn Thái Ngọc Duy, Feb 24, 2017
  12. 1/1 config: add conditional includeNguyễn Thái Ngọc Duy, Feb 24, 2017
  13. Junio C HamanoFeb 24, 2017
  14. Ramsay JonesFeb 24, 2017
  15. Philip OakleyFeb 24, 2017
  16. Duy NguyenFeb 26, 2017
  17. Philip OakleyFeb 26, 2017
  18. 0/1 Conditional config includeNguyễn Thái Ngọc Duy, Feb 24, 2017
  19. Duy NguyenFeb 24, 2017
  20. 1/1 config: add conditional includeNguyễn Thái Ngọc Duy, Feb 24, 2017
  21. Jeff KingFeb 26, 2017
  22. 0/3 Conditional config includeNguyễn Thái Ngọc Duy, Mar 1, 2017
  23. 1/3 config.txt: clarify multiple key values in include.pathNguyễn Thái Ngọc Duy, Mar 1, 2017
  24. Junio C HamanoMar 1, 2017
  25. 2/3 config.txt: reflow the second include.path paragraphNguyễn Thái Ngọc Duy, Mar 1, 2017
  26. 3/3 config: add conditional includeNguyễn Thái Ngọc Duy, Mar 1, 2017
  27. Ramsay JonesMar 1, 2017
  28. Junio C HamanoMar 1, 2017
  29. Jeff KingMar 3, 2017
  30. Junio C HamanoMar 3, 2017
  31. Jeff KingMar 3, 2017
  32. Junio C HamanoMar 1, 2017
  33. Jeff KingMar 3, 2017
  34. Duy NguyenMar 3, 2017
  35. Junio C HamanoMar 3, 2017
  36. Junio C HamanoMar 3, 2017
  37. Junio C HamanoMar 3, 2017
  38. Jeff KingMar 3, 2017
  39. Junio C HamanoMar 3, 2017

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.