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

Re: [PATCH 1/3] config.txt: describe whitespace characters further and more accurately

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 14, 2024, 16:45 UTC
Message-ID
<xmqqh6h8wymc.fsf@gitster.g>
In-Reply-To
<ff7b0a2ead90ad9a9456141da5e4df4a@manjaro.org>
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.
Previous: Dragan SimicNext: Dragan Simic
Message 10 of 14 in “Improve the documentation and test coverage for whitespace and comments”
  1. 0/3 Improve the documentation and test coverage for whitespace and commentsDragan Simic, Mar 12, 2024
  2. 2/3 config.txt: perform some minor reformattingDragan Simic, Mar 12, 2024
  3. Junio C HamanoMar 14, 2024
  4. Dragan SimicMar 14, 2024
  5. Junio C HamanoMar 14, 2024
  6. Dragan SimicMar 14, 2024
  7. 1/3 config.txt: describe whitespace characters further and more accuratelyDragan Simic, Mar 12, 2024
  8. Junio C HamanoMar 14, 2024
  9. Dragan SimicMar 14, 2024
  10. Junio C HamanoMar 14, 2024
  11. Dragan SimicMar 14, 2024
  12. 3/3 t1300: add tests for internal whitespace and inline commentsDragan Simic, Mar 12, 2024
  13. Junio C HamanoMar 14, 2024
  14. Dragan SimicMar 14, 2024

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.