From 1045978bde0ee53bed038039e045112b6d8696fe Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 28 Aug 2026 23:47:57 +0900 Subject: [PATCH] git: don't trim whitespace off the path in 'ls' and 'cat', git paths may legitimately start or end with a space. --- git.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git.go b/git.go index b52c0c7..fd130cf 100644 --- a/git.go +++ b/git.go @@ -631,7 +631,7 @@ aside from those, there is also: return fmt.Errorf("no HTTP git URLs found for repository") } - path := strings.TrimSpace(args.Get(1)) + path := args.Get(1) ref := strings.TrimSpace(c.String("ref")) var lastErr error @@ -701,7 +701,7 @@ aside from those, there is also: return fmt.Errorf("no HTTP git URLs found for repository") } - path := strings.TrimSpace(args.Get(1)) + path := args.Get(1) ref := strings.TrimSpace(c.String("ref")) var lastErr error