All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: "'GIT Mailing-list '" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Eli Schwartz" <eschwartz@gentoo.org>,
	"Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Subject: Re: [PATCH v2 3/5] meson: correct path to system config/attribute files
Date: Fri, 16 May 2025 07:45:24 +0200	[thread overview]
Message-ID: <aCbQ9OX2vqF82au8@pks.im> (raw)
In-Reply-To: <a163d515-2e71-4a42-b843-26d5d2ccdc59@ramsayjones.plus.com>

On Thu, May 15, 2025 at 05:42:00PM +0100, Ramsay Jones wrote:
> 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

  parent reply	other threads:[~2025-05-16  5:45 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 16:44 [PATCH 0/5] miscellaneous build mods (part 2) Ramsay Jones
2025-05-08 16:44 ` [PATCH 1/5] meson.build: quote the GITWEBDIR build configuration Ramsay Jones
2025-05-08 16:44   ` [PATCH 2/5] meson: correct install location of YAML.pm Ramsay Jones
2025-05-08 16:44     ` [PATCH 3/5] meson: correct path to system config/attribute files Ramsay Jones
2025-05-08 16:44       ` [PATCH 4/5] meson.build: correct setting of GIT_EXEC_PATH Ramsay Jones
2025-05-08 16:44         ` [PATCH 5/5] configure.ac: upgrade to a compilation check for sysinfo Ramsay Jones
2025-05-08 21:07           ` Eli Schwartz
2025-05-08 23:01             ` Ramsay Jones
2025-05-15 20:17               ` Eli Schwartz
2025-05-08 21:55         ` [PATCH 4/5] meson.build: correct setting of GIT_EXEC_PATH Junio C Hamano
2025-05-08 21:48       ` [PATCH 3/5] meson: correct path to system config/attribute files Junio C Hamano
2025-05-08 22:50         ` Eli Schwartz
2025-05-09  1:03           ` Junio C Hamano
2025-05-08 23:16         ` Ramsay Jones
2025-05-09  8:51       ` Patrick Steinhardt
2025-05-09 15:23         ` Ramsay Jones
2025-05-08 17:36 ` [PATCH 0/5] miscellaneous build mods (part 2) Ramsay Jones
2025-05-13 19:17 ` [PATCH v2 " Ramsay Jones
2025-05-13 19:17   ` [PATCH v2 1/5] meson.build: quote the GITWEBDIR build configuration Ramsay Jones
2025-05-13 19:17   ` [PATCH v2 2/5] meson: correct install location of YAML.pm Ramsay Jones
2025-05-13 19:17   ` [PATCH v2 3/5] meson: correct path to system config/attribute files Ramsay Jones
2025-05-14  4:36     ` Patrick Steinhardt
2025-05-15 16:42       ` Ramsay Jones
2025-05-15 17:51         ` Eli Schwartz
2025-05-15 19:53           ` Ramsay Jones
2025-05-16  5:45         ` Patrick Steinhardt [this message]
2025-05-13 19:17   ` [PATCH v2 4/5] meson.build: correct setting of GIT_EXEC_PATH Ramsay Jones
2025-06-16 22:08     ` irecca.kun
2025-05-13 19:17   ` [PATCH v2 5/5] configure.ac: upgrade to a compilation check for sysinfo Ramsay Jones
2025-05-13 20:13   ` [PATCH v2 0/5] miscellaneous build mods (part 2) Junio C Hamano
2025-05-13 20:55     ` Ramsay Jones
2025-05-16 18:48   ` [PATCH v3 " Ramsay Jones
2025-05-16 18:48     ` [PATCH v3 1/5] meson.build: quote the GITWEBDIR build configuration Ramsay Jones
2025-05-16 18:48     ` [PATCH v3 2/5] meson: correct install location of YAML.pm Ramsay Jones
2025-05-16 18:48     ` [PATCH v3 3/5] meson: correct path to system config/attribute files Ramsay Jones
2025-05-19  7:32       ` Patrick Steinhardt
2025-05-16 18:48     ` [PATCH v3 4/5] meson.build: correct setting of GIT_EXEC_PATH Ramsay Jones
2025-05-16 18:48     ` [PATCH v3 5/5] configure.ac: upgrade to a compilation check for sysinfo Ramsay Jones
2025-05-19 16:25     ` [PATCH v4 0/5] miscellaneous build mods (part 2) Ramsay Jones
2025-05-19 16:25       ` [PATCH v4 1/5] meson.build: quote the GITWEBDIR build configuration Ramsay Jones
2025-05-19 16:25       ` [PATCH v4 2/5] meson: correct install location of YAML.pm Ramsay Jones
2025-05-19 16:25       ` [PATCH v4 3/5] meson: correct path to system config/attribute files Ramsay Jones
2025-05-19 16:25       ` [PATCH v4 4/5] meson.build: correct setting of GIT_EXEC_PATH Ramsay Jones
2025-05-19 16:25       ` [PATCH v4 5/5] configure.ac: upgrade to a compilation check for sysinfo Ramsay Jones
2025-05-19 18:48       ` [PATCH v4 0/5] miscellaneous build mods (part 2) Junio C Hamano
2025-05-19 19:08         ` Patrick Steinhardt
2025-05-19 22:42           ` Ramsay Jones
2025-05-19 23:01             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aCbQ9OX2vqF82au8@pks.im \
    --to=ps@pks.im \
    --cc=congdanhqx@gmail.com \
    --cc=eschwartz@gentoo.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsayjones.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.