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

Re: [PATCH] t9001: fix/unify indentation regarding pipes somewhat

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 10, 2023, 19:09 UTC
Message-ID
<xmqqa5uysoi0.fsf@gitster.g>
In-Reply-To
<ZNS7PJ0oyOQLeaZ7@ugly>
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:
Show 16 quoted lines
>>but more like
>>
>>	A |
>>	B |
>>	C
>>
> i'd argue that this should be written as
>
> 	A |
> 		B |
> 		C
>
> like other continued lines (no trailing backslashes are needed here,
> but it would be ok to add them, and there is in fact a commit that
> does just that in other places, and one might do the same here in a
> followup).

You are entitled to your own opinion, and you are welcome to stick to it in projects you run. But please refrain from wasting time of this project on something that is subjective preference and has no absolute yardstick to tell which is _right_ or _wrong_. Difference between the above two falls into "once it is written in one way, it is not worth the patch noise to turn it into the other way", and I already told you which is the preferred way for new code.

As to trailing backslashes _after_ pipe, we have preference that is a bit stronger than "once it is written, it is not worth fixing". The shell knows, when you end a line with a vertical bar, you haven't finished your pipeline, and we do want to omit such an unnecessary backslash if we accidentally added one. b8403129 (t/t0015-hash.sh: remove unnecessary '\' at line end, 2022-02-08) is an example of such a style fix, and that is why I said the preference is a bit stronger than "once it is written...".

Previous: Oswald BuddenhagenNext: Oswald Buddenhagen
Message 4 of 6 in “t9001: fix/unify indentation regarding pipes somewhat”
  1. t9001: fix/unify indentation regarding pipes somewhatOswald Buddenhagen, Aug 9, 2023
  2. Junio C HamanoAug 9, 2023
  3. Oswald BuddenhagenAug 10, 2023
  4. Junio C HamanoAug 10, 2023
  5. Oswald BuddenhagenAug 13, 2023
  6. t9001: fix indentation in test_no_confirm()Oswald Buddenhagen, Aug 13, 2023

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.