Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure git to handle line endings automatically #1204

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jaitjacob
Copy link
Contributor

Configure Git to handle line endings automatically with people who use different operating systems. The advantage of this is that your end of line configuration now travels with your repository and you don't need to worry about whether or not collaborators have the proper global settings.

Reference: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#per-repository-settings

.gitattributes Outdated Show resolved Hide resolved
@jaitjacob jaitjacob marked this pull request as draft February 25, 2024 09:09
@jaitjacob jaitjacob marked this pull request as ready for review February 26, 2024 05:27
@strager
Copy link
Collaborator

strager commented Apr 27, 2024

I don't think this patch is working.

I disabled my Git config to restore Git's defaults. I then cloned a fresh repo on my Windows machine with this branch. Then I followed the instructions to build quick-lint-js. git status shows that there were changes:

> git status
On branch pr1204
Your branch is up to date with 'origin/pr1204'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   po/messages.pot
        modified:   src/quick-lint-js/debug/public/trace-generated.mjs
        modified:   src/quick-lint-js/diag/diagnostic-metadata-generated.cpp
        modified:   src/quick-lint-js/diag/diagnostic-metadata-generated.h
        modified:   src/quick-lint-js/fe/lex-keyword-generated.cpp
        modified:   src/quick-lint-js/i18n/translation-table-generated.cpp
        modified:   src/quick-lint-js/i18n/translation-table-generated.h
        modified:   src/quick-lint-js/i18n/translation-table-test-generated.h
        modified:   src/quick-lint-js/logging/trace-metadata-generated.cpp
        modified:   src/quick-lint-js/logging/trace-reader-generated.cpp
        modified:   src/quick-lint-js/logging/trace-reader-generated.h
        modified:   src/quick-lint-js/logging/trace-writer-generated.h
        modified:   test/test-configuration-loader.cpp
        modified:   tools/trace.bt

no changes added to commit (use "git add" and/or "git commit -a")

(The change to test/test-configuration-loader.cpp is my fault. I had to make a change manually in order to successfully build. Seems like a bug in master unrelated to your patch...)

Copy link
Collaborator

@strager strager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you test this patch? Maybe I'm confused about what it's supposed to be doing exactly.

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.

None yet

2 participants