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

Re: [StGit PATCH] Add --file option to pick

From
Karl Hasselström <kha@treskal.com>
Date
Jan 15, 2009, 08:26 UTC
Message-ID
<20090115082614.GA24890@diana.vm.bytemark.co.uk>
In-Reply-To
<20090114225930.11098.2144.stgit@localhost.localdomain>
On 2009-01-14 22:59:30 +0000, Catalin Marinas wrote:
> +    opt('-f', '--files', action = 'append',
> +        short = 'Only fold the given files'),

The long form should probably be "--file", since you only list one file for every flag (and since you call it "--file" in the last hunk). And the help text could be something like

  Only fold the given file (for multiple files, use -f more than once)
> +                raise CmdException, 'Patch folding failed'

This is not important, but I believe the recommended syntax for raising exceptions nowadays is

  CmdException('Patch folding failed')

since that's what'll continue to work in Python 3, or something like that. (I see you already use it in the multi-line case in the other patch, where this syntax is clearly the better choice.)

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Catalin Marinas
Message 2 of 2 in “Add --file option to pick”
  1. Add --file option to pickCatalin Marinas, Jan 14, 2009
  2. Karl HasselströmJan 15, 2009

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.