4 ms·
I would love to! The other day I was trying to figure out why a particular bit of code was added to libpoppler, but the author had compressed all his commits in
by jsonscripter 17y ago
I would love to! The other day I was trying to figure out why a particular bit of code was added to libpoppler, but the author had compressed all his commits into one massive 800 line commit. Totally useless to me.
- jerf 17y agoThere's different "mistakes" that can be made. Unnecessarily squashing (what you described, in git terms) is a mistake, but not really of the kind Linus is talking about. He's talking about things like "I committed a couple of commits, then took a different approach with a couple of more commits, then realized that didn't work and went for a different answer, then took a couple of commits to clean up the resulting debug code". There's no reason to leave all the temporary debug code (as opposed to permanent logging code) in there, or to leave the abortive approach in the history for others. Extra stuff like that just imposes cognitive gain for no value, in general. (If you have a specific case where that's not true, go for it, but you're probably still better off just dropping some comments into the final code.)
- Oxryly 17y agoThat sounds like bad git courtesy. There's papering over mistakes and then there's hiding the entire history of a big change...