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

Re: [PATCH v7 0/2] Conditional config includes based on remote URL

From
Elijah Newren <newren@gmail.com>
Date
Jan 10, 2022, 20:17 UTC
Message-ID
<CABPp-BGtA1KwV8kdN52r5=XTCZrS_e3sPYfTxMnoEVyVV8Hc_w@mail.gmail.com>
In-Reply-To
<20220110192246.1124991-1-jonathantanmy@google.com>
On Mon, Jan 10, 2022 at 11:22 AM Jonathan Tan <jonathantanmy@google.com> wrote:
Show 52 quoted lines
>
> Elijah Newren <newren@gmail.com> writes:
> > On Wed, Dec 15, 2021 at 7:25 AM Jonathan Tan <jonathantanmy@google.com> wrote:
> > >
> > > Thanks, everyone, for your comments. I've followed Glen's code
> > > suggestion and Junio's documentation suggestion, as you can see in the
> > > range-diff.
> >
> > So, the basic idea is, in a setting like Google's, you can have users
> > install additional files on their system out-of-band, and have the
> > users specify a simple line in their configuration to make use of
> > those additional files -- or portions thereof.  It's a way of easily
> > providing potentially large blocks of pre-vetted configuration for
> > users.
> >
> > Seems to make sense.  (and I've read over the code lightly, so feel
> > free to take this as an Acked-by.)
>
> Thanks.
>
> > But can I back up and comment on a bigger picture item?
> >
> > This mechanism requires somehow getting additional files to the user
> > separately; projects that span companies (git.git, linux.git, etc.)
> > won't likely be able to make use of this.
>
> Yes, they would also need to use a separate mechanism in addition to
> Git.
>
> > Scalar also has a mechanism for providing potentially large blocks of
> > pre-vetted configuration for users.  It does so as part of a new
> > top-level command.  And it does so with a very opinionated set of
> > values that are not configurable.  Thus, while I'd like to use it,
> > they use a configuration option that would break things badly at my
> > $DAYJOB.  (Too many gradle plugins using jgit, which doesn't
> > understand index.version=4 and will blow up with a very suboptimal
> > error message when they see it.)  And, it's very specific to scalar;
> > we probably don't want to add a new toplevel command everytime someone
> > wants common configuration to be easily grabbed by some user.
>
> Do you have more information on this? The closest thing I've seen is
> "Scalar Config" under "Modifying Configuration Values" in [1], which
> seems to be more about bundling additional tools (which may change
> config, of course).
>
> Unless you're referring to the config bundled in the Scalar tool itself,
> in which case this patch set seems orthogonal and potentially
> complementary - I was envisioning config being provided by a package
> manager package, but Scalar could provide some too for users to use at
> their own discretion.
>
> [1] https://github.com/microsoft/git/blob/7a514b4c2d5df7fdd2f66f048010d8ddcb412d0b/contrib/scalar/docs/troubleshooting.md

Yes, I was referring to the config hardcoded in the Scalar tool itself (see set_recommended_config() in https://lore.kernel.org/git/4439ab4de0bc3f48a6bdcf4b5165b16fad792ebd.1638538470.git.gitgitgadget@gmail.com/).

I agree they are different solutions to "help others setup config in a pre-vetted way", that the two don't seem to conflict, and one can't be implemented in terms of the other. It might even be possible for someone somewhere to simultaneously take advantage of both (not sure if anyone would try, but I don't forsee problems in doing so, except in the narrow case that both schemes try to set the same config and there are worries about which one "wins", which might boil down to whether the include directive came first in the config file or the specific config value that scalar set).

Show 20 quoted lines
> > It would be nice if we could find some more generic solution.
> > Granted, I can't think of any, and I don't think this comment should
> > block this particular series (nor the scalar one), but I am worrying a
> > little bit that we're getting multiple completely different solutions
> > for the same general problem, and each brings caveats big enough to
> > preclude many (most?) potential users.  I don't know what to do about
> > that, especially since configuration that is too easy to propagate
> > comes with big security problems, but I wanted to at least raise the
> > issue and hope others have good ideas.  If nothing else, I want to
> > raise awareness to avoid proliferation of similar
> > pre-vetted-configuration-deployment mechanisms.  I'm CC'ing a couple
> > scalar folks as well for that point.
>
> That's a good point. As Glen said [2], it seems like transmitting config
> itself (or, at least, hooks) through Git is something that we (the Git
> project) don't want to do, so I have been working from the basis that
> Git should just make use of config/hooks delivered through a non-Git
> mechanism, and not deliver the config/hooks itself.
>
> [2] https://lore.kernel.org/git/kl6lee5w5nng.fsf@chooglen-macbookpro.roam.corp.google.com/

Yeah, makes sense. And I don't know any better solutions. I guess all I'm really saying is that if a third narrowly targetted way to provide pre-vetted configuration shows up on the list, it may be time to ask folks to step back and try to find a more generic solution.

Previous: Jonathan TanNext: Johannes Schindelin
Message 82 of 87 in “Conditional config includes based on remote URL”
  1. 0/2 Conditional config includes based on remote URLJonathan Tan, Oct 12, 2021
  2. 1/2 config: make git_config_include() staticJonathan Tan, Oct 12, 2021
  3. Jeff KingOct 12, 2021
  4. Junio C HamanoOct 12, 2021
  5. Ævar Arnfjörð BjarmasonOct 13, 2021
  6. Junio C HamanoOct 13, 2021
  7. Jonathan TanOct 13, 2021
  8. 2/2 config: include file if remote URL matches a globJonathan Tan, Oct 12, 2021
  9. Jeff KingOct 12, 2021
  10. Jonathan TanOct 13, 2021
  11. Jeff KingOct 27, 2021
  12. Jonathan TanOct 27, 2021
  13. Junio C HamanoOct 12, 2021
  14. Jonathan TanOct 13, 2021
  15. brian m. carlsonOct 13, 2021
  16. Jonathan TanOct 13, 2021
  17. Jonathan TanOct 18, 2021
  18. Emily ShafferOct 22, 2021
  19. Jeff KingOct 27, 2021
  20. Jonathan TanOct 27, 2021
  21. Jeff KingOct 27, 2021
  22. Ævar Arnfjörð BjarmasonOct 25, 2021
  23. Jonathan TanOct 25, 2021
  24. Ævar Arnfjörð BjarmasonOct 26, 2021
  25. 0/2 Conditional config includes based on remote URLJonathan Tan, Oct 29, 2021
  26. 1/2 config: make git_config_include() staticJonathan Tan, Oct 29, 2021
  27. Emily ShafferNov 5, 2021
  28. 2/2 config: include file if remote URL matches a globJonathan Tan, Oct 29, 2021
  29. Emily ShafferNov 5, 2021
  30. Ævar Arnfjörð BjarmasonNov 6, 2021
  31. Jonathan TanNov 9, 2021
  32. Jonathan TanNov 9, 2021
  33. 0/2 Conditional config includes based on remote URLJonathan Tan, Nov 16, 2021
  34. 1/2 config: make git_config_include() staticJonathan Tan, Nov 16, 2021
  35. 2/2 config: include file if remote URL matches a globJonathan Tan, Nov 16, 2021
  36. Glen ChooNov 22, 2021
  37. Jonathan TanNov 29, 2021
  38. Junio C HamanoNov 23, 2021
  39. Jonathan TanNov 29, 2021
  40. Junio C HamanoDec 1, 2021
  41. Jonathan TanDec 2, 2021
  42. Ævar Arnfjörð BjarmasonNov 23, 2021
  43. Jonathan TanNov 29, 2021
  44. Ævar Arnfjörð BjarmasonNov 29, 2021
  45. 0/2 Conditional config includes based on remote URLJonathan Tan, Nov 29, 2021
  46. 1/2 config: make git_config_include() staticJonathan Tan, Nov 29, 2021
  47. Ævar Arnfjörð BjarmasonNov 29, 2021
  48. Junio C HamanoNov 30, 2021
  49. 2/2 config: include file if remote URL matches a globJonathan Tan, Nov 29, 2021
  50. Junio C HamanoDec 2, 2021
  51. Jonathan TanDec 2, 2021
  52. 0/2 Conditional config includes based on remote URLJonathan Tan, Dec 2, 2021
  53. 1/2 config: make git_config_include() staticJonathan Tan, Dec 2, 2021
  54. 2/2 config: include file if remote URL matches a globJonathan Tan, Dec 2, 2021
  55. Glen ChooDec 6, 2021
  56. Jonathan TanDec 7, 2021
  57. Ævar Arnfjörð BjarmasonDec 6, 2021
  58. Jonathan TanDec 7, 2021
  59. Ævar Arnfjörð BjarmasonDec 7, 2021
  60. Jonathan TanDec 7, 2021
  61. 0/2 Conditional config includes based on remote URLJonathan Tan, Dec 7, 2021
  62. 1/2 config: make git_config_include() staticJonathan Tan, Dec 7, 2021
  63. 2/2 config: include file if remote URL matches a globJonathan Tan, Dec 7, 2021
  64. Glen ChooDec 8, 2021
  65. Jonathan TanDec 9, 2021
  66. Glen ChooDec 8, 2021
  67. Jonathan TanDec 9, 2021
  68. Glen ChooDec 9, 2021
  69. Jonathan TanDec 13, 2021
  70. Junio C HamanoDec 10, 2021
  71. Jonathan TanDec 13, 2021
  72. 0/2 Conditional config includes based on remote URLJonathan Tan, Dec 14, 2021
  73. 1/2 config: make git_config_include() staticJonathan Tan, Dec 14, 2021
  74. 2/2 config: include file if remote URL matches a globJonathan Tan, Dec 14, 2021
  75. Glen ChooDec 16, 2021
  76. Elijah NewrenDec 28, 2021
  77. Jonathan TanJan 10, 2022
  78. Glen ChooDec 16, 2021
  79. Elijah NewrenDec 28, 2021
  80. Glen ChooDec 28, 2021
  81. Jonathan TanJan 10, 2022
  82. Elijah NewrenJan 10, 2022
  83. Scalar vs JGit, was Re: [PATCH v7 0/2] Conditional config includes based on remote URLJohannes Schindelin, Jan 25, 2022
  84. 0/2 Conditional config includes based on remote URLJonathan Tan, Jan 18, 2022
  85. 1/2 config: make git_config_include() staticJonathan Tan, Jan 18, 2022
  86. 2/2 config: include file if remote URL matches a globJonathan Tan, Jan 18, 2022
  87. Elijah NewrenJan 18, 2022

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.