git: don't trim whitespace off the path in 'ls' and 'cat', git paths may legitimately start or end with a space.

This commit is contained in:
Yasuhiro Matsumoto
2026-08-28 23:47:57 +09:00
parent 6fe511be6c
commit 1045978bde

4
git.go
View File

@@ -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