ledger: correct commit-census CHECK and fill census totals in md

This commit is contained in:
ledger committed 2026-10-26 03:47:06 +00:00
1 parent c23ead9651
commit 1cb97945fc
2 files changed
+4 -2

No files matched your search

@@ -2,7 +2,7 @@
Source: `git -C /root/troupe-standup log --pretty=format:%ad --date=short | sort | uniq -c | sort -rn`
{date} rows, {total} commits, {total} sum of daily counts. Consistent (sum of rows == total).
32 rows, 1691 commits, 1691 sum of daily counts. Consistent (sum of rows == total).
| # | Calendar day (author date) | Commit count |
|---|---|---|
+3 -1
View File
@@ -6,6 +6,7 @@ set -u
DIR=$(cd "$(dirname "$0")" && pwd)
tsv="$DIR/2026-10-26-commit-census.tsv"
repo="$DIR/.."
[ -f "$tsv" ] || { echo "FAIL: $tsv missing"; exit 1; }
fail=0
@@ -14,10 +15,11 @@ fail=0
# (the census in this artifact was taken as of commit 957143e). awk 'NF' keeps
# output newline-terminated so sort/uniq cannot drop the final record.
PINNED=957143e
cd "$repo" || { echo "FAIL: cannot cd $repo"; exit 1; }
expected=$(git log "$PINNED" --pretty=format:%ad --date=short | awk 'NF' | sort | uniq -c | sort -k2)
# Per-row comparison: date (col 2 of expected) vs count (col 2 of TSV).
while IFS=$'\t' read -r _ d c; do
while IFS=$'\t' read -r d c; do
[ -z "$d" ] && continue
case "$d" in date) continue;; esac
exp=$(echo "$expected" | awk -v d="$d" '$2==d {print $1}')