Re: [PATCH 4/6] sequencer: avoid empty lines after 'update-ref' instructions
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- Sep 30, 2022, 17:18 UTC
- Message-ID
- <fc887b02-191e-912a-bd15-1dc882ddf9dc@github.com>
- In-Reply-To
- <20220930140948.80367-5-szeder.dev@gmail.com>
On 9/30/2022 10:09 AM, SZEDER Gábor wrote:
Show 18 quoted lines
> When the sequencer generates a todo list for 'git rebase > --update-refs', it always inserts an empty line after each > 'update-ref' instruction and after each comment line about checked out > refs. These empty lines are unnecessary, distracting, and waste > valuable vertical screen real estate, especially when multiple refs > point to the same commit: > > pick 29a79f8 two > pick 74bf293 three > # Ref refs/heads/branch3 checked out at '/tmp/test/WT' > > update-ref refs/heads/branch2 > > update-ref refs/heads/branch1 > > pick 5f59b82 four > > Eliminate those empty lines.
After this change, I think the end result is this:
pick 29a79f8 two pick 74bf293 three # Ref refs/heads/branch3 checked out at '/tmp/test/WT' update-ref refs/heads/branch2 update-ref refs/heads/branch1 pick 5f59b82 four
Specifically, there is no whitespace break between the last 'update-ref' command and the next 'pick' command. Since the 'update-ref' commands likely correspond to chunks of changes, it would be nice to still have that whitespace remain. I agree that the whitespace between the comments and previous 'update-ref' commands is wasteful, but I'd rather leave the wasteful (and usually rare) whitespace than lose the helpful whitespace.
There is precedent for this kind of whitespace when using '--rebase-merges'.
If you can find a nice way to add a line of whitespace between these lines and the next instruction type, then I fully support this change.
Thanks, -Stolee