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

Re: [PATCH 1/2] git-svn: don't append extra newlines at the end of commit messages.

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jun 13, 2008, 16:23 UTC
Message-ID
<32541b130806130923x4c66f6ddybaaa5d7b00f6dead@mail.gmail.com>
In-Reply-To
<48522055.6060006@op5.se>
On 6/13/08, Andreas Ericsson <ae@op5.se> wrote:
Show 5 quoted lines
>  I'm not familiar with git-svn, and my perl is pretty weak as it is.
>  Are you proposing to remove extra whitespace from git commits when they are
>  sent back to svn via dcommit? If so, wouldn't it be better to always strip
>  extra newlines when importing from svn so they're never there in the first
>  place?

I thought of doing it that way (in fact, I *did* do it that way the first time). But I figured it would be too bad if you couldn't always reconstruct the precise svn commit message from the git commit message. Currently you can, even though you sometimes have to remove multiple newlines. Interestingly, the addition of the git-svn-id: line seems to be the only reason the commit messages aren't corrupted, since git normally trims whitespace from the end of its own commits.

So for the record, whether the sha1's would be affected after my patch didn't even occur to me. But it's very convenient that they're not.

Avery
Previous: Karl Hasselström
Message 9 of 9 in “git-svn: don't append extra newlines at the end of commit messages.”
  1. 1/2 git-svn: don't append extra newlines at the end of commit messages.Avery Pennarun, Jun 12, 2008
  2. 2/2 git-svn: test that extra blank lines aren't inserted in commit messages.Avery Pennarun, Jun 12, 2008
  3. Junio C HamanoJun 13, 2008
  4. Karl HasselströmJun 13, 2008
  5. Avery PennarunJun 13, 2008
  6. Andreas EricssonJun 13, 2008
  7. Karl HasselströmJun 13, 2008
  8. Karl HasselströmJun 14, 2008
  9. Avery PennarunJun 13, 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.