Manage committing whitespace changes
We should try and avoid commits which have formatting changes alongside actual code changes. There are a couple ways of doing this, such as using clang-format on a regular basis or somehow instructing Git to ignore all whitespace changes (or using a pre-commit hook to avoid them).
#1 Updated by Kyle Knoepfel over 1 year ago
Eric, the title of this issue states a possible solution to an unstated problem. I argue that making whitespace-only changes is perfectly reasonable as long as they are not conflated with more substantive changes. A better title would be something like "develop a protocol for making clean commits", where the description can then list possible solutions (e.g.):
- Formatting-only changes should have separate commits from those with substantive ones
- Pursue feasibility of instituting common source-code formatting
#3 Updated by Eric Flumerfelt about 1 year ago
I'm attaching two different .clang-format files. If we can agree on a standard .clang-format file to use for all repositories, we can then run clang-format at regular intervals and commit the resulting white-space changes.