Subject: Re: Git on Windows, CRLF issues

From: Johannes Sixt <[email-masked]>
Date: Tue, 22 Apr 2008 08:41:46 +0200

Avery Pennarun schrieb:
> Does anyone know the most efficient way to [convert CRLF] with
> git-filter-branch, when there are already thousands of files in the
> repo with CRLF in them?  Running dos2unix on all the files for every
> single revision could take a *very* long time.

I chose to write a custom script. Otherwise, a file that stays the same
throughout the history would still have been converted on each commit. My
script converted each unique file only once, then reconstructed the tree
objects and then changed the commits.

In the end I don't think it payed off. It took me a week or so to convert
the repo; I just could have let filter-branch run for a week, too. But I
also have to mention that I did the CVS->git conversion a few times to get
a suitable history, and I also repeated the CRLF conversion sometimes, and
back then git-filter-branch did not exist in its current shape.

-- Hannes