Fix wording, docs and style inconsistencies per audit of 0139564

This commit is contained in:
Ian Gulliver
2026-10-23 18:36:11 -07:00
parent 5a21396775
commit 681cc2b090
42 changed files with 469 additions and 453 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ package git
import (
"context"
"errors"
"fmt"
"os"
"strconv"
@@ -148,7 +149,7 @@ func stats(ctx context.Context, dir, base, tree string) ([]api.FileChange, error
f := api.FileChange{Status: status}
if status == api.Renamed {
if i+2 >= len(tokens) {
return nil, fmt.Errorf("truncated rename in name-status output")
return nil, errors.New("truncated rename in name-status output")
}
old := tokens[i+1]
f.OldPath = &old
@@ -156,7 +157,7 @@ func stats(ctx context.Context, dir, base, tree string) ([]api.FileChange, error
i += 2
} else {
if i+1 >= len(tokens) {
return nil, fmt.Errorf("truncated name-status output")
return nil, errors.New("truncated name-status output")
}
f.Path = tokens[i+1]
i++