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

Update .gitignore #21957

Closed
wants to merge 1 commit into from
Closed

Update .gitignore #21957

wants to merge 1 commit into from

Conversation

zent1n0
Copy link
Contributor

@zent1n0 zent1n0 commented Dec 5, 2024

clangd generates lots of files that should not be added into repository. This commit updates .gitignore file to ignore clangd generated file except for its configuration. Also updated some common build and editor files in repository.

Comment on lines +14 to +27
#==============================================================================#
# Directories to ignore (do not add trailing '/'s, they skip symlinks).
#==============================================================================#
# VS2017 and VSCode config files.
.vscode
.vs

.idea
.*.sw?
.sw?

# clangd index. (".clangd" is a config file now, thus trailing slash)
.clangd/
.cache
Copy link
Member

Choose a reason for hiding this comment

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

I hold the opinion that these entries should reside in your own .gitignore file, rather than every project you worked on.
See: https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreexcludesFile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Considering we are using Cmake as build system, it's OK with Cmake build directory?

Comment on lines +56 to +57
build*
cmake-build*
Copy link
Member

Choose a reason for hiding this comment

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

Considering we are using Cmake as build system, it's OK with Cmake build directory?

It is not clear for me about the reasons behind this change. Could you elaborate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no file build that should not be ignored by VCS, so I removed the slash for a wider match. Also add cmake-build for a regular output directory. Some items above are picked from clang repository.

Copy link
Member

Choose a reason for hiding this comment

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

There is no file build that should not be ignored by VCS, so I removed the slash for a wider match. Also add cmake-build for a regular output directory.

That line (build/) was insisted (very strongly) by someone that claims to be the de facto cmake build directory... however that claim is disputable. To avoid wasting time with the complaints we just allowed it and IMO we shouldn't bother it anymore.

Copy link
Contributor Author

@zent1n0 zent1n0 left a comment

Choose a reason for hiding this comment

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

As .vscode/ has been added into .gitignore before, I thought it's fine to adjust some other editor files. However this work can be set in global git config, thus the modifies in the repo became less necessary. Should be closed as not planned.

Comment on lines +56 to +57
build*
cmake-build*
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no file build that should not be ignored by VCS, so I removed the slash for a wider match. Also add cmake-build for a regular output directory. Some items above are picked from clang repository.

@zent1n0 zent1n0 closed this Dec 20, 2024
@zent1n0 zent1n0 deleted the upd-gitignore branch December 20, 2024 15:01
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.

2 participants