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

Re: git-commit feature request: pass editor command line options

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 14, 2009, 19:11 UTC
Message-ID
<7vvdihdc4f.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091014172337.GE6115@genesis.frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
Show 15 quoted lines
> On Tue, Oct 13, 2009 at 09:58:51PM -0700, Matthew Cline <matt@nightrealms.com> wrote:
>> 
>> I'd like to be able to have git-commit pass the commit-message editor command
>> line options which aren't passed to the editor for other usages.  Right now
>> I have "co" aliased to "!sh -c 'GIT_EDITOR=git-commit-editor git commit'",
>> where git-commit-editor is a wrapper around my editor-of-choice which passes
>> the editor the command line options I want, but it'd be simpler and cleaner
>> if I could just set "commit.editor_options=-BAR".  Or even let there be a
>> separate editor for commits, so I could do "core.editor=foo" and
>> "commit.editor=foo -BAR".
>
> Hmm, what is the use-case when using an option --foo is useful when
> creating a commit, but not useful when crating a tag?
>
> Apart from introducing inconsistency...

Not between commit and tag, but I can see you may want to auto-wrap for log message but forbid auto-wrap when editing rebase insn sheet during "rebase -i".

Previous: Miklos VajnaNext: Jeff King
Message 3 of 6 in “git-commit feature request: pass editor command line options”
  1. Matthew ClineOct 14, 2009
  2. Miklos VajnaOct 14, 2009
  3. Junio C HamanoOct 14, 2009
  4. Jeff KingOct 14, 2009
  5. Matthew ClineOct 14, 2009
  6. Miklos VajnaOct 14, 2009

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.