FlowingCode / DevelopmentConventions

Repository hosting conventions, decisions and documentation related to best coding practices that can be utilized in development projects
Apache License 2.0
9 stars 0 forks source link

Clarify what a logically atomic commit is #21

Closed javier-godoy closed 3 years ago

javier-godoy commented 3 years ago

1.0.0-rc.3 defines logically atomic commits as

commits that are big enough to add value to the project, and small enough to read, review and revert. There is no hard and fast rule for determining what adds value to the project, or what is small enough: use common sense.

However, it's common sense that common sense the least common of the senses.

A commit should implement one (and only one) thing. If commit A renders the project in an inconsistent state, and it has to be followed by another commit B, which tidies up A, it follows that A+B is a logically atomic commit, since neither A nor B stand by themselves.

Examples (in chronological order)

See also #1 and #12

Proposal: clarify that a logically atomic commit stands by itself

- These guidelines encourage logically atomic commits, i.e. commits that
+ These guidelines encourage logically atomic commits, i.e. commits that stand by themselves, 
are big enough to add value to the project, and small enough to read, review and revert.
javier-godoy commented 3 years ago

Note that "WIP" commits are necessarily not atomically.