aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/git2c/cmd_treeraw.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-06 09:58:02 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-06 09:58:02 +0800
commit6f5e22e764283262ae8c6519bb030766db0fd35b (patch)
treec56038bd7b5dc31d5bae5dd6e323688725c5262e /forged/internal/git2c/cmd_treeraw.go
parentFix load ordering issue that causes the forge title to disappear (diff)
downloadforge-6f5e22e764283262ae8c6519bb030766db0fd35b.tar.gz
forge-6f5e22e764283262ae8c6519bb030766db0fd35b.tar.zst
forge-6f5e22e764283262ae8c6519bb030766db0fd35b.zip
Add more documentation comments
Diffstat (limited to 'forged/internal/git2c/cmd_treeraw.go')
-rw-r--r--forged/internal/git2c/cmd_treeraw.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/forged/internal/git2c/cmd_treeraw.go b/forged/internal/git2c/cmd_treeraw.go
index c93480a..492cb84 100644
--- a/forged/internal/git2c/cmd_treeraw.go
+++ b/forged/internal/git2c/cmd_treeraw.go
@@ -9,6 +9,8 @@ import (
"io"
)
+// CmdTreeRaw queries git2d for a tree or blob object at the given path within the repository.
+// It returns either a directory listing or the contents of a file.
func (c *Client) CmdTreeRaw(repoPath, pathSpec string) ([]TreeEntry, string, error) {
if err := c.writer.WriteData([]byte(repoPath)); err != nil {
return nil, "", fmt.Errorf("sending repo path failed: %w", err)