Lines-changed algo?
Lines-changed algo?
Posted Jan 28, 2025 12:12 UTC (Tue) by taladar (subscriber, #68407)In reply to: Lines-changed algo? by andy_shev
Parent article: Development statistics for 6.13
Posted Jan 31, 2025 13:30 UTC (Fri)
by andy_shev (subscriber, #75870)
[Link]
It's still rare, and on top of that I precisely know what I have done in that release (most LoC changes came from removing old GPL boilerplate texts, no adding/removing whitespaces). I have just even checked by adding these to my script: "-C -D --ignore-all-space", still it gives 8790 (without 9006), but statistics shows 7755, I beleive there is a mystery (bug or feature?) in the LWN scripts.
Full script for the reference I have used:
Lines-changed algo?
git log -M -C -D --author="Andy Shevchenko" --ignore-all-space --pretty="" --numstat v6.12..v6.13
awk RS="\n" {
for (i=0; i < int(NF / 3); i++) {
sum += $(3*i+1) + $(3*i+2)
}
} END { print sum }
I even went further and cut the filenames from the `git log` output to be sure we have only numbers and calculated a sum using `bc`, same result.
