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

Re: [PATCH] tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple times

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 17, 2013, 20:34 UTC
Message-ID
<20130817203458.GB2904@elie.Belkin>
In-Reply-To
<520F9051.4040600@gmail.com>
Stefano Lattarini wrote:
> Why not encourage the use of a standardized '--action' option instead?
Because it's an unpleasant UI. :)
Show 5 quoted lines
> This can work with lesser compatibility headaches for both the commands
> taking mode options and the commands taking mode words:
>
>   "git submodule init"   becomes  "git submodule --action=init"
>   "git tag --delete TAG" becomes  "git tag --action=delete TAGNAME"

That looks like a bad change in both cases --- it involves more typing without much upside to go along with it. But

	"git submodule init"   gains synonym "git submodule --init"
	"git tag --delete TAG" stays as      "git tag --delete TAG"
looks fine to me.

In the long run, we could require that for new commands the 'action' option must come immediately after the git command name if that makes things easier to learn.

Thanks for some food for thought.

My two cents, Jonathan

Previous: Stefano LattariniNext: Junio C Hamano
Message 10 of 11 in “tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple times”
  1. tag: Use OPT_BOOL instead of OPT_BOOLEAN to allow one action multiple timesStefan Beller, Jul 30, 2013
  2. Junio C HamanoJul 30, 2013
  3. Stefan BellerJul 30, 2013
  4. Junio C HamanoJul 30, 2013
  5. Stefan BellerJul 30, 2013
  6. Junio C HamanoJul 30, 2013
  7. Stefan BellerJul 31, 2013
  8. Junio C HamanoJul 31, 2013
  9. Stefano LattariniAug 17, 2013
  10. Jonathan NiederAug 17, 2013
  11. Junio C HamanoAug 18, 2013

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.