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

Unify subcommand structure; introduce double dashes for all subcommands?

From
Stefan Beller <stefanbeller@gmail.com>
Date
Jul 23, 2014, 13:35 UTC
Message-ID
<53CFBA1A.8040600@gmail.com>

In the user survey 2012 question 23 ("In your opinion, which areas in Git need improvement?"), the most crucial point identified was the user interface. I wonder if there are any more recent surveys, showing if this has changed. Now when we want to improve the user interface, we're likely talking about the porcelain commands only, as that's what most users perceive as the commandline user interface.

A git command is generally setup as:
	git <command> [<subcommand>] [<options>] ...

The subcommands vary wildly by the nature of the command. However all subcommands could at least follow one style. The commands bundle, notes, stash and submodule have subcommands without two leading dashes (i.e. git stash list) as opposed to all other commands (i.e. git tag --list).

So my proposal is to unify the structure of the subcommands to either have always leading dashes or never. This would need a longterm thinking of course (e.g. introduce new options with(out) dashes, but support existing commands until git 3.0 or such, then drop them.)

Was there a discussion about this topic already? I'd like to read on these discussions, if any.

I could think about the following points being interesting
 * user interface (what is more appealing to a user?)
 * ease of transition (Is it really worth it? How long does it take to
pay off?)
 * ease of implementation (Could we reuse the option parser already in
   place for the double-dashed subcommands, i.e. have less LoC)
 * error-proneness of the transition

Thanks, Stefan

Next: Junio C Hamano
Message 1 of 5 in “Unify subcommand structure; introduce double dashes for all subcommands?”
  1. Stefan BellerJul 23, 2014
  2. Junio C HamanoJul 23, 2014
  3. Stefan BellerAug 10, 2014
  4. Junio C HamanoAug 10, 2014
  5. Stefan BellerAug 10, 2014

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.