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

[1.8.0 RFD] Homogeneous use of short options

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 14, 2011, 15:04 UTC
Message-ID
<4D594460.1040206@drmicha.warpmail.net>

Proposal: Make our use of short options more homogeneous.

I have put together a list of options which are used by the "most common commands", using the output of "git --help-all":

http://repo.or.cz/w/git/mjg.git/blob/options.txt
(scroll down for the short options)

This leaves out a few commands with different option parsing (diff, log, rebase, show) but indicates that we're doing a good job already. A few notable outliers:

add -A: Why capital A? Compare commit -a etc.

commit -n, fetch -n, merge -n: These are REALLY bad! Users should be able to rely on '-n' being '--dry-run' or at least being no-op to their repo, like clone/grep/tag -n.

tag -v: This is not a real problem, but users have certain expections for "-f,-h,-n,-v" which we should break as rarely as possible. OTOH, what would "verbose" mean for tag? (NB: tag.txt is grossly wrong.)

grep -?: This tries to be compatible with GNU grep, so it's a natural outlier.

Risks: Users and scripts may obviously depend on the current options names.

Migration plan: Introduce new options first (1.7.x) along with warnings in the release notes (optionally, make the commands output warnings). Then change the behavior in 1.8.0.

TODO: Generate an option list for the other common commands.

I'll also follow up with a little series fixing inconsistencies in the descriptions.

Next: Nguyen Thai Ngoc Duy
Message 1 of 6 in “[1.8.0 RFD] Homogeneous use of short options”
  1. Michael J GruberFeb 14, 2011
  2. Nguyen Thai Ngoc DuyFeb 14, 2011
  3. Jay SoffianFeb 14, 2011
  4. Junio C HamanoFeb 14, 2011
  5. Miles BaderFeb 15, 2011
  6. Michael J GruberFeb 15, 2011

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.