[Ironpython-users] line ending normalization in ipy-2.7-maint

Pawel Jasinski pawel.jasinski at gmail.com
Sat Jan 31 15:01:41 CET 2015


Hi,

I have performed normalization of line ending over the ipy-2.7-maint
in IronLanguages/main.
The normalization steps are documented on wiki:
https://github.com/paweljasinski/IronLanguages/wiki/Line-ending-normalization

The changes fix our trouble with mixed line ending (eradicated on
commit) , ugly '^M' in diff.


Details on core.autocrlf
-----------------------------------------------------------
The way files appear in your local copy depends on settings of
core.autocrlf and content of .gitattributes. The standard
.gitattributes is provided and can be used without changing default
value of core.autocrlf. If this is the case skip to next section.

for core.autocrlf there are 3 choices:
"false"  (default) - .gitattributes takes over. Files considered text
will be normalized on commit. Checkout will change files listed in
.gitattributes.
"true" - convert to native on checkout (exceptions in .gitattributes),
convert to LF on commit.
"input" - no conversion on checkout except files listed in
.gitattributes. Convert to LF on commit.

Now if you chose something different than "false" (e.g. true) you have to run:
$ git config core.autocrlf true



Now, what do you have to do to your repo:
------------------------------------------------------------
In order to refresh your working copy you need the usual:

$ git checkout ipy-2.7-maint
$ git fetch upstream
$ git merge --ff-only upstream/ipy-2.7-maint

and the one time special:

$ git ls-files -z | xargs -0 rm
$ git checkout .

I tried to time the change with minimum of outstanding PRs. The
outstanding PRs may require rebasing or manual merge. I recall good
results when using:
$ git merge -s recursive -X renormalize

--pawel


More information about the Ironpython-users mailing list