git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] make "too many arguments" a bit more useful
@ 2024-08-06  0:35 Junio C Hamano
  2024-08-06  0:35 ` [PATCH v1 1/4] refs: avoid "too many arguments" Junio C Hamano
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Junio C Hamano @ 2024-08-06  0:35 UTC (permalink / raw)
  To: git

Imagine seeing your command failing with "too many arguments" when
you run "git cmd foo bar baz".  Can you tell it will work if you
said "git cmd foo bar"?  Or is that trimming your command line too
much?  Too little?  You cannot quite tell.

If the command reported "unknown argument: 'bar'", you would know
that among the arguments you gave to "git", i.e. "cmd foo bar baz",
up to "cmd foo" were understood and "bar" and "baz" were not.

This was one of the things I noticed while reviewing a topic and
marked as leftoverbits to be cleaned up after the dust settled.  The
dust has settled and it is a good time to clean them up.

Junio C Hamano (4):
  refs: avoid "too many arguments"
  cat-file: avoid "too many arguments"
  notes: avoid "too many arguments"
  miscellaneous: avoid "too many arguments"

 builtin/cat-file.c      |  3 ++-
 builtin/notes.c         | 18 +++++++++---------
 builtin/prune-packed.c  |  6 +++---
 builtin/receive-pack.c  |  3 ++-
 builtin/refs.c          |  4 +++-
 builtin/tag.c           |  2 +-
 t/t1006-cat-file.sh     |  8 +++++---
 t/t1460-refs-migrate.sh |  7 ++++---
 t/t3301-notes.sh        |  2 +-
 9 files changed, 30 insertions(+), 23 deletions(-)

-- 
2.46.0-235-g968ce1ce0e


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-08-07  5:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-06  0:35 [PATCH v1 0/4] make "too many arguments" a bit more useful Junio C Hamano
2024-08-06  0:35 ` [PATCH v1 1/4] refs: avoid "too many arguments" Junio C Hamano
2024-08-06  6:13   ` Patrick Steinhardt
2024-08-06 16:48     ` Junio C Hamano
2024-08-06 17:11       ` [RFC] usage_msg_opt() and _optf() must die Junio C Hamano
2024-08-06 17:38         ` Eric Sunshine
2024-08-06 20:21           ` Junio C Hamano
2024-08-07  5:01             ` Patrick Steinhardt
2024-08-06 19:09         ` Justin Tobler
2024-08-06 19:24         ` Martin Ågren
2024-08-06 17:47   ` [PATCH v2] refs: avoid "too many arguments" Junio C Hamano
2024-08-06  0:35 ` [PATCH v1 2/4] cat-file: " Junio C Hamano
2024-08-06  0:35 ` [PATCH v1 3/4] notes: " Junio C Hamano
2024-08-06  0:35 ` [PATCH v1 4/4] miscellaneous: " Junio C Hamano
2024-08-06  2:31   ` Eric Sunshine
2024-08-06 16:50     ` Junio C Hamano

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).