Skip to content

Commit

Permalink
fix: Ensure committed files are normalized to LF
Browse files Browse the repository at this point in the history
This avoids accidentally committing files with CRLF line endings which `rustfmt` will happily normalize to LF creating a very noisy diff from these invisibles.
  • Loading branch information
polarathene committed May 30, 2024
1 parent 527e7f5 commit ee775c2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Pattern syntax:
# https://git-scm.com/docs/gitignore#_pattern_format

# Normalize line endings of all non-binary files to LF upon check-in (`git add` / `git commit`):
* text=auto

# Use `eol=lf` / `eol=crlf` to enforce specific line endings on checkout for compatibility:
# https://www.git-scm.com/docs/gitattributes/#_eol
# NOTE:
# - This setting implies the `text` attribute.
# - `eol=lf` may not work as expected, if a file was committed with CRLF prior to the introduction of `.gitattribtues`.
#
# Relevant files for this setting:
# - `.sh` (LF) / `.bat` (CRLF) and similar scripts that are platform specific.
# - Scripts that utilize a shebang (`#!/usr/bin/env python3`) to hint the interpreter to run.
# - `Dockerfile` (base image environment likely expects LF):
# https://github.com/docker-mailserver/docker-mailserver/pull/3755

Dockerfile* eol=lf
2 changes: 1 addition & 1 deletion .github/workflows/build_cuda_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile-cuda-all
file: Dockerfile.cuda-all
push: ${{ github.event_name != 'pull_request' }}
platforms: 'linux/amd64'
tags: ${{ steps.meta-cuda.outputs.tags }}
Expand Down
File renamed without changes.

0 comments on commit ee775c2

Please sign in to comment.