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:17 UTC
Message-ID
<32541b130806130917y23a55751tfccac0de8143ebe4@mail.gmail.com>
In-Reply-To
<7vfxrhyjqd.fsf@gitster.siamese.dyndns.org>
On 6/13/08, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Avery Pennarun <apenwarr@gmail.com> writes:
>  > Instead, let's remove all trailing whitespace from the git commit on the way
>  > through to svn.
>
> Perl part of the code looks fine but I am unsure if we like the
>  ramifications of this patch on existing git-svn managed repositories.
>  Doesn't this change the commit object name on our end for almost all of
>  them?

Unless I got confused while coding this (I don't think I did), this should *not* affect existing or re-imported svn or git-svn repositories. It only removes trailing whitespace the first time a git commit is sent into svn, which should happen only once for a brand new commit by someone who has made it in git and is now dcommiting it to svn.

Naturally, the dcommit round-trip *always* produces a new sha1 hash for that commit anyhow because of the added git-svn-id: line. After this change, the sha1 will be different than it would have been before, but it will still be the same for anyone who checks out from svn again with git-svn.

Thanks,
Avery
Previous: Karl HasselströmNext: Andreas Ericsson
Message 5 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.