(no title)
follower | 11 months ago
An advantage of a per-token commit attribution view is you don't need to transit through the history of an entire line.
Cregit is the tool used to produce the per-token view: https://github.com/cregit/cregit
I encountered Cregit recently while doing some "code history spelunking/archaeology" and thought it seemed pretty nifty.
Decided to share the link as there have been a couple of recent HN threads which included discussion about the poor granularity of line-based git "blame" functionality.
The most recent kernel version on the site is v6.13: https://cregit.linuxsources.org/code/6.13/
Unfortunately, the tool itself seems not to be under active development, the most recently modified branch is from 2 years ago & the main branch was last modified 6 years ago: https://github.com/cregit/cregit/tree/newinter
follower|11 months ago
Unfortunately the direct line-number link above doesn't seem to provide the same view as manually choosing "squash_the_stupid_serial_number(...)" rather than "Overall" in the selection/option menu accessible via the page link: https://cregit.linuxsources.org/code/6.13/arch/x86/kernel/cp...
(Apparently the only code directly from Linus' original commit for that function is `, lo, hi`. :) And, unfortunately, being from the pre-git era, it is lacking any sort of informative commit message...)
Also, as the documentation mentions the token-tracing isn't perfect, e.g. the `squash_the_stupid_serial_number` name did actually exist before the cregited commit: https://github.com/torvalds/linux/commit/0a488a53d7ca46ac638...
(Perhaps this could be related to there being multiple function implementations selected via #ifdef?)
zvr|11 months ago
My personal use case was when trying to decide origin of some code. Instead of getting who touched "something on the line" (which might be a comment after the code), you really get where each piece is coming from.