3 ms·
It shows you the commit that introduced the current version of the line. That's what you want if you want to understand the current version of the line. I feel
by jacques_chester 7y ago
It shows you the commit that introduced the current version of the line. That's what you want if you want to understand the current version of the line.
I feel like I'm missing something here. I hate this feeling of impending dumb.
- williamdclt 7y agoA line can have been touched multiple times since the breaking change (simplest example: indentation/formatting)
- jacques_chester 7y agoGot it. It's still possible to keep stepping back through the history of that line to understand its exact history. I also typically find most files have only a handful of commits of interest in their history, so scoping a git log to the file often gets me within spitting distance of the right commit, if someone took the time to write a good one. Edit: which goes back to my original point, that the commit is the best time and place to snapshot the meaning of that time and that place.
- umvi 7y agoI agree, but you must also concede that not all developers are as proficient at git as you and might not be aware of such debugging/detective techniques. These same developers tend to favor print statements for debugging instead of an actual debugger. Also, not every developer has the privilege of using a DCVS like git. For them, a comment in the code could save a lot of time and hassle.
- jacques_chester 7y agoFair points. Though I hope people at gitlab use git.