Skip to content

Commit

Permalink
(chore): Fix git conflicts with line endings (ScoopInstaller#8285)
Browse files Browse the repository at this point in the history
* fix: specify line endings behavior for .reg and .ps1 files and use LF for other text files

* fix: unify file permissions from 755 to 644

* chore: more specific comment

* fix: tell git what files are text

* fix: align .editorconfig to .gitattributes

* fix: set all files to CRLF by default

* fix: specify YAML as well

* Revert "fix: unify file permissions from 755 to 644"

This reverts commit b3cad59.

* fix: case sensitive file endings

Co-authored-by: Rashil Gandhi <[email protected]>

* fix: remove specifying line endings for .bat, .cmd, .reg and .ps1 files because it's the same as the default setting

* fix: remove specifying which files are text files since Git should be able to auto-detect it

* chore: better comment

Co-authored-by: Rashil Gandhi <[email protected]>
  • Loading branch information
maksymgendin and rashil2000 authored Apr 10, 2022
1 parent abe1544 commit acd1c96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@ trim_trailing_whitespace = true

[*.{yml,yaml}]
indent_size = 2

[*.{[Bb][Aa][Tt],[Cc][Mm][Dd]}]
# DOS/Win *requires* BAT/CMD files to have CRLF newlines
end_of_line = crlf
6 changes: 4 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# retain windows line-endings in case checked out on mac or linux
* text eol=crlf
# Since Scoop is a Windows-only tool, we can safely use CRLF line endings for all text files.
# If Git decides that the content is text, its line endings will be normalized to CRLF in the working tree on checkout.
# In the Git index/repository the files will always be stored with LF line endings. This is fine.
* text=auto eol=crlf

0 comments on commit acd1c96

Please sign in to comment.