Author: Michael Forster Date: 2022-04-28T14:27:29+02:00 New Revision: 4aba5fa774821279c2e2e26dd6ed6e1c6a151044
URL: https://github.com/llvm/llvm-project/commit/4aba5fa774821279c2e2e26dd6ed6e1c6a151044 DIFF: https://github.com/llvm/llvm-project/commit/4aba5fa774821279c2e2e26dd6ed6e1c6a151044.diff LOG: Use `-text` git attribute instead of `text eol=...` These automatic conversions lead to issues in various workflows, and all we want here are files that retain their line endings under all circumstances. `-text` captures that perfectly well and leads to fewer issues. It is preferable to `binary`, because with `-text` we still get textual diffs. Differential Revision: https://reviews.llvm.org/D124606 Added: Modified: clang-tools-extra/test/.gitattributes clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp.expected Removed: ################################################################################ diff --git a/clang-tools-extra/test/.gitattributes b/clang-tools-extra/test/.gitattributes index 42567e3196d61..3d4df1e9976bc 100644 --- a/clang-tools-extra/test/.gitattributes +++ b/clang-tools-extra/test/.gitattributes @@ -4,12 +4,12 @@ # These test input files rely on one-byte Unix (LF) line-endings, as they use # fixed -offset, FileOffset:, or Offset: numbers in their tests. -clang-apply-replacements/ClangRenameClassReplacements.cpp text eol=lf -clang-apply-replacements/Inputs/basic/basic.h text eol=lf -clang-apply-replacements/Inputs/format/no.cpp text eol=lf -clang-apply-replacements/Inputs/format/yes.cpp text eol=lf -clang-tidy/infrastructure/export-diagnostics.cpp text eol=lf +clang-apply-replacements/ClangRenameClassReplacements.cpp -text +clang-apply-replacements/Inputs/basic/basic.h -text +clang-apply-replacements/Inputs/format/no.cpp -text +clang-apply-replacements/Inputs/format/yes.cpp -text +clang-tidy/infrastructure/export-diagnostics.cpp -text # These test input files rely on two-byte Windows (CRLF) line endings. -clang-apply-replacements/Inputs/crlf/crlf.cpp text eol=crlf -clang-apply-replacements/Inputs/crlf/crlf.cpp.expected text eol=crlf +clang-apply-replacements/Inputs/crlf/crlf.cpp -text +clang-apply-replacements/Inputs/crlf/crlf.cpp.expected -text diff --git a/clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp b/clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp index 09e50c292cc91..26f79968f556d 100644 --- a/clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp +++ b/clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp @@ -1,6 +1,6 @@ - -// This file intentionally uses a CRLF newlines! - -void foo() { - int *x = 0; -} + +// This file intentionally uses a CRLF newlines! + +void foo() { + int *x = 0; +} diff --git a/clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp.expected b/clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp.expected index 7a5e11354748d..ad8e907856283 100644 --- a/clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp.expected +++ b/clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp.expected @@ -1,6 +1,6 @@ - -// This file intentionally uses a CRLF newlines! - -void foo() { - int *x = nullptr; -} + +// This file intentionally uses a CRLF newlines! + +void foo() { + int *x = nullptr; +} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits