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

Re: [PATCH] Add commit.infodisplay option to give message editor empty file

From
Jeff King <peff@peff.net>
Date
Dec 5, 2009, 16:28 UTC
Message-ID
<20091205162827.GA9584@sigill.intra.peff.net>
In-Reply-To
<20091205154753.GA3717@thermopylae.local>
On Sat, Dec 05, 2009 at 10:47:53AM -0500, James P. Howard, II wrote:
Show 11 quoted lines
> >  - While the amount of change necessary for this change doesn't look too
> >    bad, is it really worth it?  What is wrong with "1,$p" while using ed
> >    as your editor?
> 
> I tried a few variants of this, and shell script wrappers for ex (and
> gate, which is a specizalized text editor that actually works kind of
> well for commit message editing), and it worked fairly well.
> 
> The real motivation is that this feature ditches all assumptions about
> the capabilities of the text editor.  I am not sure where that leads
> yet, but I'd rather make it possible.

Is your problem that your editor doesn't show the template content and you want to see it, or is it that your editor isn't pleasant to use when the buffer is pre-filled with the template?

If the former, it seems like just dumping it to stdout isn't all that satisfying, either. What happens when your editing causes the information to scroll off the screen and you want to see it again? Couldn't you get the same thing just by doing "git status; git commit"?

If the latter, I think we would be better served by an option to simply turn off the template. Then that is also helpful for the case of people using decent editors, but who don't want to waste the CPU time on generating the template information (which can be substantial for things like media repositories).

I suspect your answer will be that it is some of both, but this just really feels like we are putting hacks into git because of one featureless editor. Hacks like that would be better suited (IMHO) to a wrapper script for the editor.

-Peff
Previous: James P. Howard, IINext: James P. Howard, II
Message 4 of 15 in “Add commit.infodisplay option to give message editor empty file”
  1. Add commit.infodisplay option to give message editor empty fileJames P. Howard, II, Dec 4, 2009
  2. Junio C HamanoDec 5, 2009
  3. James P. Howard, IIDec 5, 2009
  4. Jeff KingDec 5, 2009
  5. James P. Howard, IIDec 5, 2009
  6. Jeff KingDec 6, 2009
  7. Junio C HamanoDec 6, 2009
  8. Jeff KingDec 6, 2009
  9. Add commit.status, --status, and --no-statusJames P. Howard, II, Dec 7, 2009
  10. James PickensDec 8, 2009
  11. Jeff KingDec 8, 2009
  12. Junio C HamanoDec 8, 2009
  13. Jeff KingDec 8, 2009
  14. James P. Howard, IIDec 8, 2009
  15. James P. Howard, IIDec 7, 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.