{"thread":{"id":"8686","subject":"help with cvsimport","startedAt":"2007-06-23T09:11:32Z","lastAt":"2007-06-24T09:37:35Z","messageCount":3,"participants":["Raimund Bauer","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"45596","messageId":"1182589892.5937.10.camel@localhost","threadId":"8686","inReplyTo":null,"subject":"help with cvsimport","fromName":"Raimund Bauer","fromEmail":"ray007@gmx.net","sentAt":"2007-06-23T09:11:32Z","receivedAt":"2007-06-23T09:11:32Z","isPatch":false,"sender":{"key":"ray007@gmx.net","avatar":null},"body":"Hi,\n\nI unfortunately have to work with several cvs-repositories and was\nwondering if there was a way to have the files processed on import:\n- strip trailing whitespace\n- convert to newline-only line endings\n\nKnowing git there probably is already a way to do that - I'd appreciate\nany rtfm-pointers ...\n\nMany thanks in advance\n\n-- \nbest regards\n\n  Ray\n"},{"id":"45603","messageId":"Pine.LNX.4.64.0706231213020.4059@racer.site","threadId":"8686","inReplyTo":"1182589892.5937.10.camel@localhost","subject":"Re: help with cvsimport","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-06-23T11:27:25Z","receivedAt":"2007-06-23T11:27:25Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 23 Jun 2007, Raimund Bauer wrote:\n\n> I unfortunately have to work with several cvs-repositories and was\n> wondering if there was a way to have the files processed on import:\n> - strip trailing whitespace\n> - convert to newline-only line endings\n\nIf you want to use cvsimport incrementally, I'd rather not process the \n\"origin\" branch like this, but rather use git-filter-branch (with a simple \nindex filter) to do that.\n\nEven if you do not want to use it incrementally, it seems easier and \ncleaner (if somewhat slower) to me.\n\nSo, something like\n\n\tgit filter-branch --index-filter 'git ls-files |\n\t\twhile read name; do\n\t\t\tperl -pi -e \"s/[ \\009\\015]*$//\" \"$name\"\n\t\tdone\n\t\tgit add -u' cleaned-up-origin\n\nshould do.\n\nHth,\nDscho\n"},{"id":"45656","messageId":"467E3B5F.5070508@gmx.net","threadId":"8686","inReplyTo":"Pine.LNX.4.64.0706231213020.4059@racer.site","subject":"Re: help with cvsimport","fromName":"Raimund Bauer","fromEmail":"ray007@gmx.net","sentAt":"2007-06-24T09:37:35Z","receivedAt":"2007-06-24T09:37:35Z","isPatch":false,"sender":{"key":"ray007@gmx.net","avatar":null},"body":"Hi,\n\n* Johannes Schindelin wrote, On 23.06.2007 13:27:\n> Hi,\n>\n> On Sat, 23 Jun 2007, Raimund Bauer wrote:\n>\n>   \n>> I unfortunately have to work with several cvs-repositories and was\n>> wondering if there was a way to have the files processed on import:\n>> - strip trailing whitespace\n>> - convert to newline-only line endings\n>>     \n>\n> If you want to use cvsimport incrementally, I'd rather not process the \n> \"origin\" branch like this, but rather use git-filter-branch (with a simple \n> index filter) to do that.\n>\n> Even if you do not want to use it incrementally, it seems easier and \n> cleaner (if somewhat slower) to me.\n>\n> So, something like\n>\n> \tgit filter-branch --index-filter 'git ls-files |\n> \t\twhile read name; do\n> \t\t\tperl -pi -e \"s/[ \\009\\015]*$//\" \"$name\"\n> \t\tdone\n> \t\tgit add -u' cleaned-up-origin\n>\n> should do.\n>   \nThanks, will try that out.\nTough I'm not very happy about having to create an extra branch for \nevery branch I want to work with.\nAnd a git-solution would also respect git-attributes ...\n> Hth,\n> Dscho\n>   \n-- \n\nbest regards\n\n  Ray\n"}]}