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

Re: [PATCH v2] git-commit.txt: Correct option alternatives

From
Jeff King <peff@peff.net>
Date
Jun 8, 2008, 04:23 UTC
Message-ID
<20080608042356.GA11194@sigill.intra.peff.net>
In-Reply-To
<484B37B6.1040408@freescale.com>
On Sat, Jun 07, 2008 at 08:36:54PM -0500, Jon Loeliger wrote:
>> Furthermore, for long-option consistency --author <author>
>> is changed to --author=<author>.
> Say, if we were to document and espouse one form over the other,
> which would you recommend or prefer?
$ sed -ne '/sticked/,/^$/p' Documentation/gitcli.txt
 * when a command line option takes an argument, use the 'sticked' form.  In
   other words, write `"git foo -oArg"` instead of `"git foo -o Arg"` for short
   options, and `"git foo --long-opt=Arg"` instead of `"git foo --long-opt Arg"`
   for long options.  An option that takes optional option-argument must be
   written in the 'sticked' form.

'sticked' form must be used: ---------------------------- $ git describe --abbrev HEAD # correct $ git describe --abbrev=10 HEAD # correct $ git describe --abbrev 10 HEAD # NOT WHAT YOU MEANT ----------------------------

-Peff
Previous: Jon Loeliger
Message 12 of 12 in “git-commit.txt: Correct option alternatives”
  1. 1/2 git-commit.txt: Correct option alternativesStephan Beyer, Jun 7, 2008
  2. 2/2 git-commit.txt: Add missing long/short optionsStephan Beyer, Jun 7, 2008
  3. Junio C HamanoJun 7, 2008
  4. 1/5 git-commit.txt: Add missing long/short optionsStephan Beyer, Jun 8, 2008
  5. 2/5 Docs: Use "-l::\n--long\n" format in OPTIONS sectionsStephan Beyer, Jun 8, 2008
  6. 3/5 Docs: add some long/short optionsStephan Beyer, Jun 8, 2008
  7. 4/5 git-describe.txt: document --alwaysStephan Beyer, Jun 8, 2008
  8. 5/5 git-name-rev.txt: document --no-undefined and --alwaysStephan Beyer, Jun 8, 2008
  9. Christian CouderJun 7, 2008
  10. git-commit.txt: Correct option alternativesStephan Beyer, Jun 7, 2008
  11. Jon LoeligerJun 8, 2008
  12. Jeff KingJun 8, 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.