[Numpy-discussion] whitespace in git repo

Darren Dale dsdale24@gmail....
Tue Oct 19 07:12:46 CDT 2010


We have been discussing whitespace and line endings at the following
pull request: http://github.com/numpy/numpy/pull/4 . Chuck suggested
we discuss it here on the list.

I have the following set in my ~/.gitconfig file:

    [apply]
        whitespace = fix

    [core]
        autocrlf = input

which is attempting to correct some changes in:

branding/icons/numpylogo.svg
branding/icons/numpylogoicon.svg
tools/win32build/nsis_scripts/numpy-superinstaller.nsi.in

David C. suggested that the nsi.in file should not be changed. I
suggested adding a .gitattributes file along with the existing
.gitignore file in the numpy repo. This would enforce windows line
endings for the nsi.in file:

tools/win32build/nsis_scripts/numpy-superinstaller.nsi.in eol=crlf

alternatively this would disable any attempt to convert line endings:

tools/win32build/nsis_scripts/numpy-superinstaller.nsi.in -text

I think the former is preferable. But it seems like a good idea to
include some git config files in the repo to ensure trailing
whitespace is stripped and line endings are appropriate to the numpy
project, regardless of what people may have in their ~/.gitconfig
file. Comments?

Darren


More information about the NumPy-Discussion mailing list