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

Re: [PATCH] Document 'git commit --no-edit' explicitly

From
Jeff King <peff@peff.net>
Date
Nov 2, 2012, 11:53 UTC
Message-ID
<20121102115335.GA2598@sigill.intra.peff.net>
In-Reply-To
<1351852770-13897-1-git-send-email-Matthieu.Moy@imag.fr>
On Fri, Nov 02, 2012 at 11:39:30AM +0100, Matthieu Moy wrote:
> I was tempted to merge the paragraph with --edit::, but I thought this
> may add confusion. The use-cases for --edit and --no-edit are really
> different so I went for a separate paragraph, right below the --edit one.

Yeah, usually I think it would be better to keep the positive and negative forms together, but the way you have done it does seem a lot more clear to me. I think it is because the default flips based on other options. So you would be stuck writing something like:

  -e, --edit::
          Edit the commit message using `$EDITOR`. This is the default
          unless the `-F`, `-m`, or `-C` options are used; in those
          cases, `-e` or `--edit` can be used to invoke the editor.
          Likewise, `--no-edit` can be used to suppress the editor when
          using an existing commit message. For example, `git commit
          --amend --no-edit` amends a commit without changing its commit
          message.
Your split reads much better, IMHO.
Thanks.
-Peff
Previous: Matthieu MoyNext: Jeff King
Message 8 of 9 in “Wishlist: git commit --no-edit”
  1. Niels MöllerNov 2, 2012
  2. Matthieu MoyNov 2, 2012
  3. Jeff KingNov 2, 2012
  4. Niels MöllerNov 2, 2012
  5. Document 'git commit --no-edit' explicitlyMatthieu Moy, Nov 2, 2012
  6. Niels MöllerNov 2, 2012
  7. Matthieu MoyNov 2, 2012
  8. Jeff KingNov 2, 2012
  9. Jeff KingNov 2, 2012

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.