diff options
| author | Simon <simon@magnaview.com> | 2015-08-03 07:38:07 +0100 |
|---|---|---|
| committer | Simon <simon@magnaview.com> | 2015-08-03 07:38:07 +0100 |
| commit | ac728c248361df6ab8c23d8c5cfece7391c871db (patch) | |
| tree | 64ce3ea4fa99f029fcd4824c6ee6a371b0e453b3 /src/transports/git.c | |
| parent | c400bac4db12d8be95f1876d16231743b5696244 (diff) | |
| download | libgit2-ac728c248361df6ab8c23d8c5cfece7391c871db.tar.gz | |
Handle ssh:// and git:// urls containing a '~' character.
For such a path '/~/...' the leading '/' is stripped so the server will
get a path starting with '~' and correctly handle it.
Diffstat (limited to 'src/transports/git.c')
| -rw-r--r-- | src/transports/git.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/transports/git.c b/src/transports/git.c index 7e0a47414..52de92d09 100644 --- a/src/transports/git.c +++ b/src/transports/git.c @@ -50,6 +50,8 @@ static int gen_proto(git_buf *request, const char *cmd, const char *url) } repo = delim; + if (repo[1] == '~') + ++repo; delim = strchr(url, ':'); if (delim == NULL) |
