-
-
Notifications
You must be signed in to change notification settings - Fork 983
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
Remove defunct .gitconfig file #2078
Remove defunct .gitconfig file #2078
Conversation
Build size and comparison to main:
|
d73e933
to
a1add0a
Compare
Agreed, it makes sense to move it into the docs. I think it'd make sense to move it and remove the file at the same time (otherwise it might get forgotten about), would you be able to move it into the docs as part of this PR? If you don't have the time that's no problem, I'll try get round to it at some point. Sorry for the glacial review :( |
9b9eb68
to
4066cc0
Compare
I have added I have considered adding a bullet point to the "PR checklist" in CONTRIBUTING.md:
but this seems a bit out of place. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually on further thought, I think it might just be best to remove it:
whitespace = blank-at-eol,blank-at-eof,space-before-tab
is the default, so this line does nothing unless you modified your global git config (and you better know what you're doing if you have)
And bad whitespace in general will be caught by clang-format, so CI will fail. I suspect most people are using editors which strip whitespace anyway: I don't think anybody really knows about the .gitconfig and I haven't seen any whitespace issues when reviewing
What do you think?
ah, I missed this. for some reason I believed that one of them was not default.
I assume clang-format will only format C files? Then python scripts and other stuff require extra attention. But yes, I think this is the way to go.
yes
certainly not me before googling for this PR 😅
I have not yet seen many projects that make recommendations for I'll add a revert commit, just squash it ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fully agree, thanks for the comments and patch :)
not actually used by git, see https://git-scm.com/docs/git-config and https://stackoverflow.com/q/18329621
This reverts commit 4066cc0.
24dccce
to
6c8562b
Compare
The
.gitconfig
is not actually used by git unless manually configured to do so. The repo-specific git config is located in.git/config
. The only.gitconfig
file read by git is the one in the user home directory. Seegit config
docs and the answers to this stackoverflow question.I believe it is misleading to have this file in the repo as it implies the config is automatically applied. I for one have wasted a lot of time trying to fix the
.gitconfig
file before I realized this and came up with #2077 instead.If I am mistaken and the
.gitconfig
file represents recommendations for contributors or similar then I strongly recommend to have this reflected somewhere in the docs, or noted as a comment in the defunct.gitconfig
file.