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

Re: [PATCH] shortlog: take the first populated line of the description

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 5, 2008, 21:27 UTC
Message-ID
<7vy78wlv46.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.1.00.0803051346200.2947@xanadu.home>
Nicolas Pitre <nico@cam.org> writes:
Show 12 quoted lines
> On Wed, 5 Mar 2008, Andy Whitcroft wrote:
> ...
>> 	...  I cannot think of any good reason not to take the first
>> 	populated line for a shortlog.	The alternative less agressive
>> 	compromise might be to skip only completly empty lines at the
>> 	start, but I am not sure that adds any value.
>> 
>> 	I seem to get a lot of these in converted SVN commits.
>> 
>> 	Comments?
>
> Maybe it is the SVN conversion that needs fixing?
I thought about saying the same, but I am of two minds.

It is likely that you would want to clean-up when importing, especially when you are planning to abandon the other system and switch to git. But you may want to have an import that is as close to the original as possible, excess blank lines in the log messages and all.

I think Andy's fix to make the output side take away unnecessary blank lines is unconditionally good.

I've added these three lines at the end of the log message.
    This is often useful when dealing with commits imported from foreign SCMs
    that do not tidy up the log message of useless blank lines at the
    beginning.
Previous: Nicolas PitreNext: Nicolas Pitre
Message 6 of 8 in “shortlog: take the first populated line of the description”
  1. shortlog: take the first populated line of the descriptionAndy Whitcroft, Mar 5, 2008
  2. Johannes SchindelinMar 5, 2008
  3. Andy WhitcroftMar 5, 2008
  4. Johannes SchindelinMar 5, 2008
  5. Nicolas PitreMar 5, 2008
  6. Junio C HamanoMar 5, 2008
  7. Nicolas PitreMar 5, 2008
  8. Junio C HamanoMar 5, 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.