summaryrefslogtreecommitdiff
path: root/repo.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-09-17 14:00:03 -0600
committertjpcc <tjp@ctrl-c.club>2023-09-17 14:00:03 -0600
commitce0def95f3924a10b0faceb72aa5df18bf813fb1 (patch)
tree2f0300d84738343ea2fb9f13db1af1e649b41917 /repo.go
parentebea6fe755fb052b79cbe05b6280611337e1e5f6 (diff)
GOPHER
Diffstat (limited to 'repo.go')
-rw-r--r--repo.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/repo.go b/repo.go
index 820e8b2..72291b6 100644
--- a/repo.go
+++ b/repo.go
@@ -46,6 +46,10 @@ func (r *Repository) Name() string {
return strings.TrimSuffix(name, ".git")
}
+func (r *Repository) NameBytes() []byte {
+ return []byte(r.Name())
+}
+
func (r *Repository) cmd(ctx context.Context, cmdname string, args ...string) (*cmdResult, error) {
args = append([]string{"--git-dir=" + string(*r), cmdname}, args...)
start := time.Now()