{"thread":{"id":"18244","subject":"Remove leading/trailing whitespace from commit messages when importing from Subversion?","startedAt":"2009-03-10T03:14:09Z","lastAt":"2009-03-10T06:15:26Z","messageCount":3,"participants":["Mike Swanson","Marcel M. Cary"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"107538","messageId":"49B5DB01.8080206@gmail.com","threadId":"18244","inReplyTo":null,"subject":"Remove leading/trailing whitespace from commit messages when importing from Subversion?","fromName":"Mike Swanson","fromEmail":"mikeonthecomputer@gmail.com","sentAt":"2009-03-10T03:14:09Z","receivedAt":"2009-03-10T03:14:09Z","isPatch":false,"sender":{"key":"mikeonthecomputer@gmail.com","avatar":null},"body":"I was wondering if it's possible to removing leading and trailing\nwhitespace (tabs, newlines, spaces) from commit messages when importing\nfrom Subversion via git-svn.\n\nI've got a repository with tens of thousands of commits, and not all of\nthe messages are entered... sanely.  I need to know whether it is\npossible to clean these up when transfering the repository to Git.\n\n\nThanks.\n"},{"id":"107540","messageId":"49B5FCD3.8060707@oak.homeunix.org","threadId":"18244","inReplyTo":"49B5DB01.8080206@gmail.com","subject":"Re: Remove leading/trailing whitespace from commit messages when importing from Subversion?","fromName":"Marcel M. Cary","fromEmail":"marcel@oak.homeunix.org","sentAt":"2009-03-10T05:38:27Z","receivedAt":"2009-03-10T05:38:27Z","isPatch":false,"sender":{"key":"marcel@oak.homeunix.org","avatar":"https://gravatar.com/avatar/2bb524e4f383167b7e256bb93256c88353748d9873c34cde0fd461f1165baa0f?d=mp&s=160"},"body":"Mike Swanson wrote:\n> I was wondering if it's possible to removing leading and trailing\n> whitespace (tabs, newlines, spaces) from commit messages when importing\n> from Subversion via git-svn.\n> \n> I've got a repository with tens of thousands of commits, and not all of\n> the messages are entered... sanely.  I need to know whether it is\n> possible to clean these up when transfering the repository to Git.\n\nTry \"git filter-branch --msg-filter your-filter-command\".\n\nMarcel\n"},{"id":"107542","messageId":"49B6057E.2020706@gmail.com","threadId":"18244","inReplyTo":"49B5FCD3.8060707@oak.homeunix.org","subject":"Re: Remove leading/trailing whitespace from commit messages when importing from Subversion?","fromName":"Mike Swanson","fromEmail":"mikeonthecomputer@gmail.com","sentAt":"2009-03-10T06:15:26Z","receivedAt":"2009-03-10T06:15:26Z","isPatch":false,"sender":{"key":"mikeonthecomputer@gmail.com","avatar":null},"body":"Marcel M. Cary wrote:\n> Try \"git filter-branch --msg-filter your-filter-command\".\n>\n> Marcel\n>   \n\nThank you, after-the-fact works fine too.  :)\n\nIf anyone else searches the archives and wonders how I did it, this sed\ncommand is it: sed -e \"s/^[ \\t]*//;s/[ \\t]*$//;/^$/d\"\n\nUnix rules!\n"}]}