Re:Four rules for effective collaboration – Guidelines for b...
by sirsuki on Wednesday March 07, 2018 @10:34AM
(#16537050)
In my experience these assertions are untrue. Also the tickets are often the over arching context and will have nothing to do with the code. My product owner doesn't care if I had to try three different algorithms till I got it right; but my colleagues and my future self sure would love to see that and all the stack overflow links during a git bisect!
Not only that but the ticket is a full feature. Maybe it took 5 commits to get there: "Fix bad indenting", "Extract base logic to command object", "Update I18N entries", "Add missing tests for current behavior", "Add the feature asked for".
Re:Four rules for effective collaboration – Guidelines for b...
by ozim on Wednesday March 07, 2018 @04:28PM
(#16540068)
From what I see you just agree with my comment. Those 5 commits you described as example are the way I would do it.
The way it is described in article would make you do it in one commit and add information that would be in the ticket.
Re:Four rules for effective collaboration – Guidelines for b...
by deiwin on Thursday March 08, 2018 @12:26AM
(#16542499)
Also, the ticket and the commits can provide answers to the same questions without being redundant. The answers are just at a different level of abstraction and for different readers. Tickets usually describe product-level decisions, while commits describe implementation-specific details. E.g. a ticket may discuss alternative user flows, while a related commit explains why a specific algorithm, module, or default configuration value was used.
Re:Four rules for effective collaboration – Guidelines for b...
by deiwin on Wednesday March 07, 2018 @04:49PM
(#16540244)
What makes you say that? The Focused rule from the article is also meant to persuade you to split the work into similarly concise and focused commits.
Re:Four rules for effective collaboration – Guidelines for b...
by ozim on Thursday March 08, 2018 @02:34AM
(#16542943)
Focused and complete are opposite. You can have focused commits or complete commits.
Re:Four rules for effective collaboration – Guidelines for b...
by deiwin on Wednesday March 07, 2018 @10:23AM
(#16536956)
Tying the ticketing system and the repository together is a good idea and definitely worth implementing, but there's a fine balance in deciding what context should be kept in the ticket and what in the code repository. If you put too much into to the ticket and too little into the commits, then git blame loses it's value, for example.
"Every commit should be complete." and "Every commit should only do a single thing." and then make it in a way that someone could actually review changes. In most cases it is not possible, more often it is complete or does single thing.