Keep committed release note reads offline

This commit is contained in:
2026-10-10 15:20:03 +00:00
parent 80d88a0352
commit 6c7b77970b
5 changed files with 106 additions and 4 deletions

View File

@@ -116,11 +116,11 @@ func ReadCommitFile(ctx context.Context, repositoryDir, commit, name string) ([]
if !validObjectID(commit) || name == "" || path.IsAbs(name) || path.Clean(name) != name || strings.HasPrefix(name, "../") || name == ".." || strings.Contains(name, "\\") {
return nil, fmt.Errorf("invalid committed file identity %q at %q", name, commit)
}
content, err := run(ctx, repositoryDir, nil, "show", commit+":"+name)
content, err := readLocalObjects(ctx, repositoryDir, nil, "show", commit+":"+name)
if err != nil {
return nil, fmt.Errorf("read committed file %q: %w", name, err)
}
return []byte(content), nil
return content, nil
}
// CommittedPaths resolves individual paths from captured objects. It requests