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

Re: help with cvsimport

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 23, 2007, 11:27 UTC
Message-ID
<Pine.LNX.4.64.0706231213020.4059@racer.site>
In-Reply-To
<1182589892.5937.10.camel@localhost>
Hi,
On Sat, 23 Jun 2007, Raimund Bauer wrote:
> I unfortunately have to work with several cvs-repositories and was
> wondering if there was a way to have the files processed on import:
> - strip trailing whitespace
> - convert to newline-only line endings

If you want to use cvsimport incrementally, I'd rather not process the "origin" branch like this, but rather use git-filter-branch (with a simple index filter) to do that.

Even if you do not want to use it incrementally, it seems easier and cleaner (if somewhat slower) to me.

So, something like
	git filter-branch --index-filter 'git ls-files |
		while read name; do
			perl -pi -e "s/[ \009\015]*$//" "$name"
		done
		git add -u' cleaned-up-origin
should do.

Hth, Dscho

Previous: Raimund BauerNext: Raimund Bauer
Message 2 of 3 in “help with cvsimport”
  1. Raimund BauerJun 23, 2007
  2. Johannes SchindelinJun 23, 2007
  3. Raimund BauerJun 24, 2007

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.