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

Remove the 'build' directory by default #4331

Closed
wants to merge 1 commit into from

Conversation

comps
Copy link
Collaborator

@comps comps commented May 6, 2019

Most OSS projects that use cmake let the user or a script create
the directory instead of it being pre-created.

While it might seems just like a convenience here, if you actually
remove the directory (to make a new build) and later commit with
git commit -a, the removal of build/.gitkeep will be added to
the commit.

.gitignore does not help here as it only prevents untracked files
from being added - changes in existing tracked files are still
registered.

While there are other local-only workarounds like

git update-index --skip-worktree build/.gitkeep

a cleaner solution is removing the default build dir altogether.

Most OSS projects that use cmake let the user or a script create
the directory instead of it being pre-created.

While it might seems just like a convenience here, if you actually
remove the directory (to make a new build) and later commit with
`git commit -a', the removal of `build/.gitkeep' will be added to
the commit.

.gitignore does not help here as it only prevents untracked files
from being added - changes in existing tracked files are still
registered.

While there are other local-only workarounds like

  git update-index --skip-worktree build/.gitkeep

a cleaner solution is removing the default build dir altogether.

Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
@scrutinizer-notifier
Copy link

The inspection completed: 2 new issues

@redhatrises
Copy link
Contributor

Kind Nack. This is provided for content authors and not developers who are familiar with Cmake.

@comps
Copy link
Collaborator Author

comps commented May 7, 2019

The main problem I wanted to address was the removed .gitkeep getting in the way of git add -a rather than cmake ecosystem conformance. If you don't have problems with it polluting pull requests, feel free to close this PR - the change was really meant to help with project maintenance and if it doesn't help, it's useless.

I can re-submit the build_project multi-job tweak separately.

@redhatrises
Copy link
Contributor

I can re-submit the build_project multi-job tweak separately.

@comps please do submit the build_project multi-job tweak separately.

@comps comps closed this May 7, 2019
@comps comps deleted the remove-default-build branch August 6, 2019 10:16
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.

3 participants