[PATCH 0/2] parse-options: properly align continued usage output

From
Ævar Arnfjörð Bjarmason <hidden>
Date
2021-09-01 11:13:07
This series changes usage_with_options_internal() in parse-options.c
to properly align continued "\n" usage output.

Before this change some built-ins using the API effectively tried to
hack around the lack of such alignment, with some getting it wrong,
and some getting it right. Others such as "git stash -h" didn't at
all, and their continued "\n" output would always look weirdly
misaligned. Now the output all looks nice!

This came about from following the thread of "why we we even have '\n'
here at all?", which is a question I had in my own mind around
https://lore.kernel.org/git/87zgszxirn.fsf@evledraar.gmail.com (local)

Ævar Arnfjörð Bjarmason (2):
  built-ins: "properly" align continued usage output
  parse-options: properly align continued usage output

 builtin/ls-remote.c   |  4 +--
 builtin/show-branch.c |  6 ++--
 builtin/stash.c       |  2 +-
 builtin/tag.c         |  2 +-
 parse-options.c       | 79 ++++++++++++++++++++++++++++++++++++-------
 5 files changed, 73 insertions(+), 20 deletions(-)

-- 
2.33.0.807.gf14ecf9c2e9
Thread (30 messages) 30 messages, 2 authors, 2021-09-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help