aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/git2c/cmd_index.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-08-12 11:01:07 +0800
committerRunxi Yu <me@runxiyu.org>2025-09-26 17:25:37 +0800
commite238ccb06b05e88ec323ca95ad4600bd79743372 (patch)
tree46f82d4d0f4ec43e94dcde5677de1ba857862638 /forged/internal/git2c/cmd_index.go
parentRemove forge-specific functions from misc (diff)
downloadforge-e238ccb06b05e88ec323ca95ad4600bd79743372.tar.gz
forge-e238ccb06b05e88ec323ca95ad4600bd79743372.tar.zst
forge-e238ccb06b05e88ec323ca95ad4600bd79743372.zip
RefactorHEADmaster
Diffstat (limited to '')
-rw-r--r--forged/internal/ipc/git2c/cmd_index.go (renamed from forged/internal/git2c/cmd_index.go)8
1 files changed, 4 insertions, 4 deletions
diff --git a/forged/internal/git2c/cmd_index.go b/forged/internal/ipc/git2c/cmd_index.go
index 8862b2c..44a0845 100644
--- a/forged/internal/git2c/cmd_index.go
+++ b/forged/internal/ipc/git2c/cmd_index.go
@@ -10,13 +10,13 @@ import (
"io"
)
-// CmdIndex requests a repository index from git2d and returns the list of commits
-// and the contents of a README file if available.
func (c *Client) CmdIndex(repoPath string) ([]Commit, *FilenameContents, error) {
- if err := c.writer.WriteData([]byte(repoPath)); err != nil {
+ err := c.writer.WriteData([]byte(repoPath))
+ if err != nil {
return nil, nil, fmt.Errorf("sending repo path failed: %w", err)
}
- if err := c.writer.WriteUint(1); err != nil {
+ err = c.writer.WriteUint(1)
+ if err != nil {
return nil, nil, fmt.Errorf("sending command failed: %w", err)
}