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

Re: [PATCH] git-commit.sh: Fix usage checks regarding paths given when they do not make sense

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 5, 2007, 21:39 UTC
Message-ID
<7vlk9cnzhb.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1194291393-1067-1-git-send-email-B.Steinbrink@gmx.de>
Björn Steinbrink <B.Steinbrink@gmx.de> writes:
Show 6 quoted lines
> The checks that looked for paths given to git-commit in addition to
> --all or --interactive expected only 3 values, while the case statement
> actually provides 4, so the check was never triggered.
>
> The bug was introduced in 6cbf07efc5702351897dee4742525c9b9f7828ac when
> the case statement was extended to handle --interactive.
Gaah, and thanks.

We really should have "negative" tests to catch this kind of breakage in our testsuite. People when inventing new features are eager to write tests to show off the new stuff works, but not many people are careful enough to add tests to demonstrate the commands properly catch user errors such as borked command line options.

Previous: Björn Steinbrink
Message 2 of 2 in “git-commit.sh: Fix usage checks regarding paths given when they do not make sense”
  1. git-commit.sh: Fix usage checks regarding paths given when they do not make senseBjörn Steinbrink, Nov 5, 2007
  2. Junio C HamanoNov 5, 2007

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.