Skip to content

Conversation

@esainane
Copy link
Contributor

The process in ZeroK-RTS#711 is repeated for upstream.

Statistics:

  • 261 files were previously checked in as CRLF without conversion, and are now converted to LF in the index.
  • 68 files were previously missing a trailing newline.
  • 98 files previously contained trailing whitespace on lines which had other content.

There are some very unusual mixed line endings in libs/lcs/docs/luadoc.css not corrected here, but that can be saved for a later PR. The same is true of the ZK repository.

This copies the .gitattributes file from the Zero-K repository.
This ensures we have no CRLF checked into the index.

This process can be automated by the following:

git add --renormalize .
This process can be automated by the following:

while read f; do
  if diff /dev/null "$f" | tail -1 | grep '^\\ No newline' > /dev/null; then
    echo >> "$f";
  fi;
done < <(git ls-files '*.lua' '*.tdf' '*.h' '*.glsl' '*.fs' '*.json' '*.txt' '*.css')
This applies only to trailing whitespace after real content. Lines consisting
entirely of whitespace have been left untouched.

This process can be automated by the following:

while read f; do sed -i 's/\([^\t ]\)[\t ]*$/\1/' "$f"; done < <(git ls-files '*.lua' '*.tdf' '*.h' '*.glsl' '*.fs' '*.json' '*.txt' '*.css')
@gajop gajop merged commit 21a7968 into Spring-Chobby:master Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants