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

Re: [RFC PATCH] builtin-log: Add options to --coverletter

From
Jeff King <peff@peff.net>
Date
May 16, 2009, 05:07 UTC
Message-ID
<20090516050718.GA7330@sigio.peff.net>
In-Reply-To
<7v63g2tewu.fsf@alter.siamese.dyndns.org>
On Fri, May 15, 2009 at 11:11:13AM -0700, Junio C Hamano wrote:
Show 17 quoted lines
> This is a tangent, but I do not think the current cover-letter that uses
> shortlog matches everybody's needs.  The shortlog format lists commits
> grouped by the author and does not number them, and it makes it hard to
> match which message in the series corresponds to which entry in the cover
> letter, especially when your series have a resend of somebody else's patch
> in it.  I wouldn't be surprised if somebody comes up with a different
> style that is based on "git log --reverse --oneline A..B" output (perhaps
> without the shortened object name part) and name it the "oneline" style,
> e.g.
> 
>     From: Jeff King
> 
>     *** BLURB HERE ***
>     The following patches do ...
> 
>     1/2	parseopt: add OPT_NEGBIT (Réne Scharfe)
>     2/2 ls-files: make --no-empty-directory negatable

At one point I was working on --pretty=format specifiers for "total number of commits" and "incremental commit number". The eventual goal being an option like coverletter.logformat that you could set to "%xi/%xn %s".

Sadly, the code got a bit messy because the feature straddles the line of pretty.c and actual rev traversal. I started some refactoring, but dropped it halfway through, and now of course it is woefully out of date (a lesson in "merge early, merge often"). So I just pipe "git log --oneline" through nl manually. ;)

So yes, I think somebody would be interested in alternate styles. And while I think most people would want to set their default style as a config variable, it may make sense to override on the command-line (e.g., for a series that is mostly from you versus one that is from mixed authors).

-Peff
Previous: Junio C HamanoNext: James Cloos
Message 9 of 10 in “builtin-log: Add options to --coverletter”
  1. builtin-log: Add options to --coverletterJoe Perches, May 15, 2009
  2. Junio C HamanoMay 15, 2009
  3. Joe PerchesMay 15, 2009
  4. Junio C HamanoMay 15, 2009
  5. Joe PerchesMay 15, 2009
  6. Junio C HamanoMay 16, 2009
  7. Joe PerchesMay 16, 2009
  8. Junio C HamanoMay 16, 2009
  9. Jeff KingMay 16, 2009
  10. James CloosMay 16, 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.