36 lines
794 B
Bash
Executable File
36 lines
794 B
Bash
Executable File
#!/bin/sh
|
|
|
|
git log --since="3 years ago" \
|
|
--numstat \
|
|
--pretty=format:"COMMIT %H" |
|
|
awk '
|
|
/^COMMIT/ { next }
|
|
|
|
/^[0-9]/ {
|
|
file = $3
|
|
|
|
# Exclude generated / mechanical files
|
|
if (file ~ /^include\/com\/sun\/star\//) next
|
|
if (file ~ /^offapi\//) next
|
|
if (file ~ /^udkapi\//) next
|
|
if (file ~ /^workdir\//) next
|
|
if (file ~ /^translations\//) next
|
|
if (file ~ /^helpcontent2/) next
|
|
|
|
# Exclude build / tooling noise
|
|
if (file ~ /\.mk$/) next
|
|
if (file ~ /^configure(\.ac|\.in)?$/) next
|
|
if (file ~ /^download\.lst$/) next
|
|
if (file ~ /^solenv\//) next
|
|
|
|
files[file]++
|
|
churn[file] += $1 + $2
|
|
}
|
|
END {
|
|
for (f in files) {
|
|
printf "%6d commits | %8d LOC churn | %s\n",
|
|
files[f], churn[f], f
|
|
}
|
|
}' |
|
|
sort -nr
|