From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH v1 0/4] make "too many arguments" a bit more useful
Date: Mon, 5 Aug 2024 17:35:35 -0700 [thread overview]
Message-ID: <20240806003539.3292562-1-gitster@pobox.com> (raw)
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
next reply other threads:[~2024-08-06 0:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 0:35 Junio C Hamano [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240806003539.3292562-1-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).