git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Dragan Simic <dsimic@manjaro.org>
Cc: git@vger.kernel.org,  rsbecker@nexbridge.com,  github@seichter.de
Subject: Re: [PATCH 1/3] config.txt: describe whitespace characters further and more accurately
Date: Thu, 14 Mar 2024 09:45:47 -0700	[thread overview]
Message-ID: <xmqqh6h8wymc.fsf@gitster.g> (raw)
In-Reply-To: <ff7b0a2ead90ad9a9456141da5e4df4a@manjaro.org> (Dragan Simic's message of "Thu, 14 Mar 2024 07:20:00 +0100")

Dragan Simic <dsimic@manjaro.org> writes:

> Though, further investigation shows that setting a configuration value,
> by invoking git-config(1), converts value-internal tabs into "\t" escape
> sequences, which the value-parsing logic doesn't "squash" into spaces.

Correct.  It would have been nicer to just quote values that had
whitespaces in them, but replacing HT to SP while turning HT that
comes from our tool into "\t" would still let the value round-trip,
while breaking anything written manually in editors.  If you stay
within Git without using any editor, what ebdaae37 (config: Keep
inner whitespace verbatim, 2009-07-30) left us is at least
internally consistent.

> I'd be happy to include the bugfix into this series, if my
> above-mentioned
> fears prove to be unnecessary.

Documenting status quo is a good place to stop for now.  I do not
know if it is a good idea to add too many tests to etch the current
behaviour that we know is wrong and we'll need to update when we fix
the bug, though.

Thanks.

  reply	other threads:[~2024-03-14 16:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 15:55 [PATCH 0/3] Improve the documentation and test coverage for whitespace and comments Dragan Simic
2024-03-12 15:55 ` [PATCH 1/3] config.txt: describe whitespace characters further and more accurately Dragan Simic
2024-03-14  1:18   ` Junio C Hamano
2024-03-14  6:20     ` Dragan Simic
2024-03-14 16:45       ` Junio C Hamano [this message]
2024-03-14 18:48         ` Dragan Simic
2024-03-12 15:55 ` [PATCH 2/3] config.txt: perform some minor reformatting Dragan Simic
2024-03-14  1:58   ` Junio C Hamano
2024-03-14  6:20     ` Dragan Simic
2024-03-14 16:22       ` Junio C Hamano
2024-03-14 18:40         ` Dragan Simic
2024-03-12 15:55 ` [PATCH 3/3] t1300: add tests for internal whitespace and inline comments Dragan Simic
2024-03-14  2:18   ` Junio C Hamano
2024-03-14  6:20     ` Dragan Simic

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=xmqqh6h8wymc.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=dsimic@manjaro.org \
    --cc=git@vger.kernel.org \
    --cc=github@seichter.de \
    --cc=rsbecker@nexbridge.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 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).