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

Re: [PATCH v2 3/5] meson: correct path to system config/attribute files

From
Patrick Steinhardt <ps@pks.im>
Date
May 16, 2025, 05:45 UTC
Message-ID
<aCbQ9OX2vqF82au8@pks.im>
In-Reply-To
<a163d515-2e71-4a42-b843-26d5d2ccdc59@ramsayjones.plus.com>
On Thu, May 15, 2025 at 05:42:00PM +0100, Ramsay Jones wrote:
Show 29 quoted lines
> On 14/05/2025 05:36, Patrick Steinhardt wrote:
> > On Tue, May 13, 2025 at 08:17:24PM +0100, Ramsay Jones wrote:
> >> diff --git a/meson.build b/meson.build
> >> index 48f31157a0..7f811030bd 100644
> >> --- a/meson.build
> >> +++ b/meson.build
> >>  editor_opt = get_option('default_editor')
> >>  if editor_opt != '' and editor_opt != 'vi'
> >>    libgit_c_args += '-DDEFAULT_EDITOR="' + editor_opt + '"'
> >> diff --git a/meson_options.txt b/meson_options.txt
> >> index 8547c0eb47..ff877e67ce 100644
> >> --- a/meson_options.txt
> >> +++ b/meson_options.txt
> >> @@ -3,9 +3,9 @@ option('default_pager', type: 'string', value: 'less',
> >>    description: 'Fall-back pager.')
> >>  option('default_editor', type: 'string', value: 'vi',
> >>    description: 'Fall-back editor.')
> >> -option('gitconfig', type: 'string', value: '/etc/gitconfig',
> >> +option('gitconfig', type: 'string', # default 'etc/gitconfig'
> >>    description: 'Path to the global git configuration file.')
> >> -option('gitattributes', type: 'string', value: '/etc/gitattributes',
> >> +option('gitattributes', type: 'string', # default 'etc/gitattributes'
> >>    description: 'Path to the global git attributes file.')
> > 
> > I'd prefer if we documented the default value in the description.
> > Otherwise it is impossible to discover it without having a look at the
> > sources.
> 
> Hmm, but how do you get the description! :)
[snip]
> The only way I have found to display the project options to the user (after
> configuring the project) is using 'meson configure', thus:  
>   
Yup, that's how I typically do it.
[snip]
> Also, looking through that list, other options which are similarly specified
> to gitconfig/gitattributes don't have their 'default' noted in the description.
> Why make an exception for these options?

It's not so much about one being exceptional, it's rather that I didn't think about it for the other options. Ideally, we'd document the default for all values where we don't have a hardcoded one.

> Is this what you wanted to see? If so, then I can submit a v3 with the
> above changes. Just let me know.
Yup, the diff you had looks exactly like what I expected. Thanks!
Patrick
Previous: Ramsay JonesNext: Ramsay Jones
Message 26 of 48 in “miscellaneous build mods (part 2)”
  1. 0/5 miscellaneous build mods (part 2)Ramsay Jones, May 8, 2025
  2. 1/5 meson.build: quote the GITWEBDIR build configurationRamsay Jones, May 8, 2025
  3. 2/5 meson: correct install location of YAML.pmRamsay Jones, May 8, 2025
  4. 3/5 meson: correct path to system config/attribute filesRamsay Jones, May 8, 2025
  5. 4/5 meson.build: correct setting of GIT_EXEC_PATHRamsay Jones, May 8, 2025
  6. 5/5 configure.ac: upgrade to a compilation check for sysinfoRamsay Jones, May 8, 2025
  7. Eli SchwartzMay 8, 2025
  8. Ramsay JonesMay 8, 2025
  9. Eli SchwartzMay 15, 2025
  10. Junio C HamanoMay 8, 2025
  11. Junio C HamanoMay 8, 2025
  12. Eli SchwartzMay 8, 2025
  13. Junio C HamanoMay 9, 2025
  14. Ramsay JonesMay 8, 2025
  15. Patrick SteinhardtMay 9, 2025
  16. Ramsay JonesMay 9, 2025
  17. Ramsay JonesMay 8, 2025
  18. 0/5 miscellaneous build mods (part 2)Ramsay Jones, May 13, 2025
  19. 1/5 meson.build: quote the GITWEBDIR build configurationRamsay Jones, May 13, 2025
  20. 2/5 meson: correct install location of YAML.pmRamsay Jones, May 13, 2025
  21. 3/5 meson: correct path to system config/attribute filesRamsay Jones, May 13, 2025
  22. Patrick SteinhardtMay 14, 2025
  23. Ramsay JonesMay 15, 2025
  24. Eli SchwartzMay 15, 2025
  25. Ramsay JonesMay 15, 2025
  26. Patrick SteinhardtMay 16, 2025
  27. 4/5 meson.build: correct setting of GIT_EXEC_PATHRamsay Jones, May 13, 2025
  28. irecca.kun@gmail.comJun 16, 2025
  29. 5/5 configure.ac: upgrade to a compilation check for sysinfoRamsay Jones, May 13, 2025
  30. Junio C HamanoMay 13, 2025
  31. Ramsay JonesMay 13, 2025
  32. 0/5 miscellaneous build mods (part 2)Ramsay Jones, May 16, 2025
  33. 1/5 meson.build: quote the GITWEBDIR build configurationRamsay Jones, May 16, 2025
  34. 2/5 meson: correct install location of YAML.pmRamsay Jones, May 16, 2025
  35. 3/5 meson: correct path to system config/attribute filesRamsay Jones, May 16, 2025
  36. Patrick SteinhardtMay 19, 2025
  37. 4/5 meson.build: correct setting of GIT_EXEC_PATHRamsay Jones, May 16, 2025
  38. 5/5 configure.ac: upgrade to a compilation check for sysinfoRamsay Jones, May 16, 2025
  39. 0/5 miscellaneous build mods (part 2)Ramsay Jones, May 19, 2025
  40. 1/5 meson.build: quote the GITWEBDIR build configurationRamsay Jones, May 19, 2025
  41. 2/5 meson: correct install location of YAML.pmRamsay Jones, May 19, 2025
  42. 3/5 meson: correct path to system config/attribute filesRamsay Jones, May 19, 2025
  43. 4/5 meson.build: correct setting of GIT_EXEC_PATHRamsay Jones, May 19, 2025
  44. 5/5 configure.ac: upgrade to a compilation check for sysinfoRamsay Jones, May 19, 2025
  45. Junio C HamanoMay 19, 2025
  46. Patrick SteinhardtMay 19, 2025
  47. Ramsay JonesMay 19, 2025
  48. Junio C HamanoMay 19, 2025

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.