Update ssh.go

This commit is contained in:
lhchavez 2021-11-07 12:17:35 -08:00 committed by GitHub
parent bc0bbe92b3
commit 5b07f86fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

4
ssh.go
View File

@ -76,8 +76,8 @@ func (t *sshSmartSubtransport) Action(urlString string, action SmartServiceActio
} }
// Escape \ and '. // Escape \ and '.
uPath := strings.ReplaceAll(u.Path, `\`, `\\`) uPath := strings.Replace(u.Path, `\`, `\\`, -1)
uPath = strings.ReplaceAll(uPath, `'`, `\'`) uPath = strings.Replace(uPath, `'`, `\'`, -1)
// TODO: Add percentage decode similar to libgit2. // TODO: Add percentage decode similar to libgit2.
// Refer: https://github.com/libgit2/libgit2/blob/358a60e1b46000ea99ef10b4dd709e92f75ff74b/src/str.c#L455-L481 // Refer: https://github.com/libgit2/libgit2/blob/358a60e1b46000ea99ef10b4dd709e92f75ff74b/src/str.c#L455-L481