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

Re: [JGIT PATCH 17/28] Support automatic command line parsing for TextBuiltin subclasses

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 18, 2008, 20:38 UTC
Message-ID
<20080718203834.GA27528@spearce.org>
In-Reply-To
<4880E880.1010403@web.de>
Florian KKKberle <FloriansKarten@web.de> wrote:
Show 10 quoted lines
> I had a short look at the files and noticed that the inner "if (help) {"
> is unnecessary:
>
> +		if (help) {
> +			System.err.print("jgit ");
> +			System.err.print(commandName);
> +			clp.printSingleLineUsage(System.err);
> +			System.err.println();
> +
> +			if (help) {

Gaaah. Good catch, thanks. I copied and pasted that block from the global option parser to the per-command parser, and then refactored it a little and missed removing this unnecessary inner if test. I'll fix with a rebase.

-- 
Shawn.
Previous: Florian Köberle
Message 2 of 2 in “Re: [JGIT PATCH 17/28] Support automatic command line parsing for TextBuiltin subclasses”
  1. Florian KöberleJul 18, 2008
  2. Shawn O. PearceJul 18, 2008

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.