From 59608fd41c1ec2bdab8dfebbb1786bd84d8b5fa1 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Sun, 7 Dec 2025 20:07:15 +0100 Subject: Rename `Ref` method with `String` --- pkg/git/git.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/git/git.go') diff --git a/pkg/git/git.go b/pkg/git/git.go index 7fc28fa..4fd551a 100644 --- a/pkg/git/git.go +++ b/pkg/git/git.go @@ -94,7 +94,7 @@ func Files(ref Ref, repoDir string) ([]Blob, error) { // -r: recurse into subtrees // -l: include blob size - cmd := exec.Command("git", "ls-tree", "--full-tree", "-r", "-l", ref.Ref()) + cmd := exec.Command("git", "ls-tree", "--full-tree", "-r", "-l", ref.String()) if repoDir != "" { cmd.Dir = repoDir } @@ -200,7 +200,7 @@ func BlobContent(ref Ref, path string, repoDir string) ([]byte, bool, error) { ref = NewRef("HEAD") } // Use `git show ref:path` to get the blob content at that ref - cmd := exec.Command("git", "show", ref.Ref()+":"+path) + cmd := exec.Command("git", "show", ref.String()+":"+path) if repoDir != "" { cmd.Dir = repoDir } @@ -233,7 +233,7 @@ func Commits(ref Ref, repoDir string) ([]Commit, error) { "--date=unix", "--pretty=format:" + strings.Join(format, "\x1F"), "-z", // Separate the commits with NULs instead of newlines - ref.Ref(), + ref.String(), } cmd := exec.Command("git", args...) -- cgit v1.2.3