You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(skills): read-diff.sh --summary reports +0/-0 for every file #3131
read-diff.sh --summary reports (+0/-0) for every file and splits each file's line across three lines.
For each file, grep -A 1000 "diff --git a/${file} b/" starts its output with that file's own header, and grep -m 1 -B 1000 "^diff --git" then stops on that same line. Only the header is left to count, so grep -c "^+" and grep -c "^-" print 0. grep -c also exits 1 when nothing matches, so the || echo "0" fallback appends a second 0, and the value becomes 0 newline 0.
The PowerShell twin is fine: read-diff.ps1 -Summary on the same input prints src/a.txt (+2/-1) and src/b.txt (+1/-1).
Expected Behavior
One line per file with the real counts, the same as read-diff.ps1 reports for the same diff.
Steps to Reproduce
With a pr-reference.xml whose diff changes src/a.txt by +2/-1 and src/b.txt by +1/-1, bash read-diff.sh --input pr.xml --summary prints:
Activity
fix(skills): count per-file changes in read-diff.sh summary mode (mic…