Keep committed release note reads offline
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user