-
-
Notifications
You must be signed in to change notification settings - Fork 255
Remove obsolete junk from .gitignore #498
base: master
Are you sure you want to change the base?
Conversation
# IDEA IDEs | ||
.idea/ |
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.
Please keep this
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.
Could have a slash in front though, for only ignoring at toplevel.
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.
No, .gitignore is for files that should be ignored for everyone working on the project. Files that are created only by your own system should be ignored for you only:
git config --global core.excludesFile '.idea'
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.
Sounds good, just the discoverability of this is so bad it has escaped me for over a decade as a good approach instead of listing them in project .gitignore. To the point it seems like something to note in some development docs of ours then, or we'll start getting PRs that try to add them all the time and we won't have anything to point them at as per instructions from our end.
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.
Sure, could you make a pull request to add it to CONTRIBUTING.md?
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.
I cannot recall seeing a pull request where someone accidentally included a file generated by their editor. If that ever does happen, it is easy to catch in code review and tell the author to run git config --global core.excludesFile
so I don't see what the problem is.
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.
I also think that this should be kept, I don't see any benefits of removing 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.
Keeping this here is a statement that these specific editors are preferred. I don't think that's appropriate.
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.
But vcpkg_installed is also in the gitignore, so that means that I have to use vcpkg to install dependencies?
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.
Keeping this here is a statement that these specific editors are preferred. I don't think that's appropriate.
On the contrary, if they were preferred, you'd let people ship relevant configurations of IDEs with them, rather than block them from doing so and "degrade" the integration with those specific IDEs, which is what we're doing here. If the .gitignore
bore this sort of significance, it'd also be as if we were saying "we only prefer IDEs that leave junk in directories", which doesn't make too much sense.
Some repositories (especially the ones concerning JavaScript code, from what I've seen) leave IDE-specific directories on purpose in order to allow people to come up with a development environment instantly. This explicitly disallows people from doing so.
We could have a comment explaining that these editors are not preferred instead, maybe?
Signed-off-by: Be <[email protected]>
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.
|
Hi, @AN7body! Welcome to GitHub! I'm not sure if there's something you wanted to say about the change, but it didn't go through, unfortunately. |
*.obj | ||
*.pyc | ||
|
||
# Other unwanted files. |
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.
This entire section should not be removed.
*.bsc | ||
*.aps | ||
|
||
# Precompiled Headers |
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.
Neither should this one.
*.pch | ||
*.ncb | ||
|
||
# Compiled Dynamic libraries |
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.
Same. These aren't "junk" or "outdated". They serve as extremely low-cost safe-guards against accidents. I don't know why you would ever take such a hardline approach to git ignores. They cost almost nothing to maintain, nothing to check and they prevent accidents.
*.a | ||
*.lib | ||
|
||
# Executables |
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.
These are also useful safeguards.
# Compiled translation files (GNU Machine Object) | ||
*.gmo | ||
|
||
# Compiled Static libraries |
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.
Same here, but you could get rid of the top two and just leave .a
and .lib
lib-src/twolame/simplefrontend/stwolame | ||
|
||
# Mac Specific | ||
.DS_Store |
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.
This should be left in. I believe Mac creates these automatically as hidden files to store folder attributes. Someone could literally commit this and have no idea it was even in the commit.
@@ -198,21 +12,4 @@ help/temp* | |||
src/RevisionIdent.h | |||
win/resetPrefs.txt | |||
|
|||
# Emacs backup files | |||
*~ |
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.
These are files automatically created by emacs in a lot of cases and if anyone has their emacs setup to generate them it's very easy to accidentally commit them.
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.
This is also done by some other editors too.
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.
Yes, other editors do this too. Following your reasoning, we should add the files created by every editor out there into .gitignore... do you really think that's appropriate?
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.
No, I meant some editors create ~
files too.
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.
Please see my other comments.
@emabrey all the build artifacts are ignored by ignoring the CMake build directory. |
Someone can just go |
If someone uses a different name for their CMake build directory, I think it's kinda silly to attempt to add every single file within that to .gitignore. I have never seen people accidentally committing entire CMake build directories be a problem in practice. Also if someone deviates from the documented build instructions, I think it's on them to know what they're doing. |
But using the https://www.toptal.com/developers/gitignore |
I have a really hard time taking something that uses a Docker container to setup a .gitignore file seriously. |
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.
(If you are only frustrated about the *.pc
part, make it more specific)
I see this as an overall negative change, and it will probably frustrate more people by committing in files generated by their OS or editor.
PS: Feel free to remove the lib-src .gitignores from devendored dependencies
Resolves: stupid issues like https://github.com/tenacityteam/tenacity/pull/494#issuecomment-901845204
Checklist
-s
orSigned-off-by
* (See: Contributing § DCO)* indicates required