From: Junio C Hamano <gitster@pobox.com>
To: Ralph Seichter <github@seichter.de>
Cc: Ralph Seichter via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] Allow git-config to append a comment
Date: Thu, 07 Mar 2024 04:12:20 -0800 [thread overview]
Message-ID: <xmqqplw6nsuz.fsf@gitster.g> (raw)
In-Reply-To: <2560952c-4495-4a71-9497-aa40032e1d2b@seichter.de> (Ralph Seichter's message of "Wed, 6 Mar 2024 18:24:56 +0100")
Ralph Seichter <github@seichter.de> writes:
>> If you are illustrating a sample input, please also explain what
>> output it produces. What do the resulting lines in the config file
>> look like after you run this command?
>
> The result of running the above command looks as follows:
>
> [safe]
> directory = /home/alice/somerepo.git #I changed this. --A. Script
That would have been a crucial piece of information to have in the
proposed log message, as limiting ourselves to a comment that is
tucked after the same line as the value, things can become somewhat
simplified. We may not have to worry about deletion, even though the
point about "we need to look at and typofix them with our viewers
and editors" still stands.
By the way, you may or may not have noticed it, but my example
deliberately had a multi-line comment:
$ git config --global --comment 'the reason why I added ~alice/
is because ...' --add safe.directory /home/alice/somerepo.git
How such a thing is handled also needs to be discussed in the
proposed log message, and perhaps in the documentation as well.
> ... My patch only supports
> single-line comments, and only as a suffix to newly added key-value
> pairs. This is a deliberate design choice.
Such design choices need to be described in the proposed log message
to help future developers who will be updating this feature, once it
gets in.
Thanks for writing quite a lot to answer _my_ questions, but these
questions are samples of things that future developers would wonder
and ask about when they want to fix bugs in, enhance, or otherwise
modify the implementation of this "add comment" feature. They may
even be working on adding other features to complement the "add
comment" feature, by designing support for viewing or typofixing
existing comments. When they do so, it would help them to know how
this existing feature was expected to be used and how it would fit
in a larger picture (which may not have yet existed back when the
feature was invented). Answering these anticipated questions is one
of the greatest things that a commit log message can do to help
them.
Thanks.
next prev parent reply other threads:[~2024-03-07 12:12 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 6:00 [PATCH] Allow git-config to append a comment Ralph Seichter via GitGitGadget
2024-03-06 16:01 ` Junio C Hamano
2024-03-06 17:24 ` Ralph Seichter
2024-03-07 12:12 ` Junio C Hamano [this message]
2024-03-07 12:44 ` Ralph Seichter
2024-03-07 13:27 ` Junio C Hamano
2024-03-07 13:53 ` rsbecker
2024-03-07 15:26 ` Ralph Seichter
2024-03-07 15:40 ` rsbecker
2024-03-07 15:57 ` Ralph Seichter
2024-03-07 15:15 ` [PATCH v2] config: add --comment option to add " Ralph Seichter via GitGitGadget
2024-03-11 12:55 ` Junio C Hamano
2024-03-11 16:17 ` Dragan Simic
2024-03-11 16:48 ` rsbecker
2024-03-11 17:00 ` Dragan Simic
2024-03-11 17:52 ` Dragan Simic
2024-03-11 17:29 ` Junio C Hamano
2024-03-11 17:34 ` Dragan Simic
2024-03-11 19:54 ` Junio C Hamano
2024-03-12 2:25 ` Dragan Simic
2024-03-11 18:23 ` Ralph Seichter
2024-03-11 18:50 ` Dragan Simic
2024-03-11 18:57 ` Ralph Seichter
2024-03-11 19:04 ` Dragan Simic
2024-03-11 21:31 ` Junio C Hamano
2024-03-12 2:38 ` Dragan Simic
2024-03-11 19:17 ` rsbecker
2024-03-12 2:27 ` Dragan Simic
2024-03-11 18:16 ` Ralph Seichter
2024-03-11 18:55 ` Dragan Simic
2024-03-11 19:04 ` Ralph Seichter
2024-03-12 6:19 ` Ralph Seichter
2024-03-12 6:37 ` Chris Torek
2024-03-12 7:28 ` Ralph Seichter
2024-03-12 7:44 ` Junio C Hamano
2024-03-12 21:47 ` [PATCH v3] " Ralph Seichter via GitGitGadget
2024-03-15 22:15 ` Junio C Hamano
2024-03-15 22:26 ` [PATCH 3/1] config: allow tweaking whitespace between value and comment Junio C Hamano
2024-03-26 22:06 ` Junio C Hamano
2024-03-26 22:48 ` Ralph Seichter
2024-03-26 23:27 ` Junio C Hamano
2024-03-27 0:27 ` Ralph Seichter
2024-03-27 1:23 ` Dragan Simic
2024-03-27 17:27 ` Junio C Hamano
2024-03-15 23:10 ` [PATCH v3] config: add --comment option to add a comment Eric Sunshine
2024-03-15 23:41 ` Junio C Hamano
2024-03-15 23:44 ` 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=xmqqplw6nsuz.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=github@seichter.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).