Fossil SCM
Put "--" before the host name on the ssh command lines of "fossil patch push", "fossil patch pull" and "fossil ui HOST:REPO", as the ssh transport already does, so that ssh does not take a user name that begins with "-" for an option.
Commit
dda3a7874c8b262c0980ab9297b15dbbbd281b2f336ebd753844aba569defc46
Parent
e6c67c8b596813f…
2 files changed
+1
-1
+1
-1
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -3572,11 +3572,11 @@ | ||
| 3572 | 3572 | blob_init(&ssh, 0, 0); |
| 3573 | 3573 | for(isRetry=0; isRetry<2 && !bRunning; isRetry++){ |
| 3574 | 3574 | blob_reset(&ssh); |
| 3575 | 3575 | transport_ssh_command(&ssh); |
| 3576 | 3576 | blob_appendf(&ssh, |
| 3577 | - " -t -L 127.0.0.1:%d:127.0.0.1:%d %!$", | |
| 3577 | + " -t -L 127.0.0.1:%d:127.0.0.1:%d -- %!$", | |
| 3578 | 3578 | iPort, iPort, zRemote |
| 3579 | 3579 | ); |
| 3580 | 3580 | if( zFossilCmd==0 ){ |
| 3581 | 3581 | if( ssh_needs_path_argument(zRemote,-1) ^ isRetry ){ |
| 3582 | 3582 | ssh_add_path_argument(&ssh); |
| 3583 | 3583 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3572,11 +3572,11 @@ | |
| 3572 | blob_init(&ssh, 0, 0); |
| 3573 | for(isRetry=0; isRetry<2 && !bRunning; isRetry++){ |
| 3574 | blob_reset(&ssh); |
| 3575 | transport_ssh_command(&ssh); |
| 3576 | blob_appendf(&ssh, |
| 3577 | " -t -L 127.0.0.1:%d:127.0.0.1:%d %!$", |
| 3578 | iPort, iPort, zRemote |
| 3579 | ); |
| 3580 | if( zFossilCmd==0 ){ |
| 3581 | if( ssh_needs_path_argument(zRemote,-1) ^ isRetry ){ |
| 3582 | ssh_add_path_argument(&ssh); |
| 3583 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3572,11 +3572,11 @@ | |
| 3572 | blob_init(&ssh, 0, 0); |
| 3573 | for(isRetry=0; isRetry<2 && !bRunning; isRetry++){ |
| 3574 | blob_reset(&ssh); |
| 3575 | transport_ssh_command(&ssh); |
| 3576 | blob_appendf(&ssh, |
| 3577 | " -t -L 127.0.0.1:%d:127.0.0.1:%d -- %!$", |
| 3578 | iPort, iPort, zRemote |
| 3579 | ); |
| 3580 | if( zFossilCmd==0 ){ |
| 3581 | if( ssh_needs_path_argument(zRemote,-1) ^ isRetry ){ |
| 3582 | ssh_add_path_argument(&ssh); |
| 3583 |
+1
-1
| --- src/patch.c | ||
| +++ src/patch.c | ||
| @@ -756,11 +756,11 @@ | ||
| 756 | 756 | blob_appendf(&cmd, " patch %s%s %$ -", zRemoteCmd, zForce, zDir); |
| 757 | 757 | }else{ |
| 758 | 758 | Blob remote; |
| 759 | 759 | *(char*)(zDir-1) = 0; |
| 760 | 760 | transport_ssh_command(&cmd); |
| 761 | - blob_appendf(&cmd, " -T"); | |
| 761 | + blob_appendf(&cmd, " -T --"); /* End of switches */ | |
| 762 | 762 | blob_append_escaped_arg(&cmd, zRemote, 0); |
| 763 | 763 | blob_init(&remote, 0, 0); |
| 764 | 764 | if( zFossilCmd==0 ){ |
| 765 | 765 | if( ssh_needs_path_argument(zRemote,-1) ^ isRetry ){ |
| 766 | 766 | ssh_add_path_argument(&cmd); |
| 767 | 767 |
| --- src/patch.c | |
| +++ src/patch.c | |
| @@ -756,11 +756,11 @@ | |
| 756 | blob_appendf(&cmd, " patch %s%s %$ -", zRemoteCmd, zForce, zDir); |
| 757 | }else{ |
| 758 | Blob remote; |
| 759 | *(char*)(zDir-1) = 0; |
| 760 | transport_ssh_command(&cmd); |
| 761 | blob_appendf(&cmd, " -T"); |
| 762 | blob_append_escaped_arg(&cmd, zRemote, 0); |
| 763 | blob_init(&remote, 0, 0); |
| 764 | if( zFossilCmd==0 ){ |
| 765 | if( ssh_needs_path_argument(zRemote,-1) ^ isRetry ){ |
| 766 | ssh_add_path_argument(&cmd); |
| 767 |
| --- src/patch.c | |
| +++ src/patch.c | |
| @@ -756,11 +756,11 @@ | |
| 756 | blob_appendf(&cmd, " patch %s%s %$ -", zRemoteCmd, zForce, zDir); |
| 757 | }else{ |
| 758 | Blob remote; |
| 759 | *(char*)(zDir-1) = 0; |
| 760 | transport_ssh_command(&cmd); |
| 761 | blob_appendf(&cmd, " -T --"); /* End of switches */ |
| 762 | blob_append_escaped_arg(&cmd, zRemote, 0); |
| 763 | blob_init(&remote, 0, 0); |
| 764 | if( zFossilCmd==0 ){ |
| 765 | if( ssh_needs_path_argument(zRemote,-1) ^ isRetry ){ |
| 766 | ssh_add_path_argument(&cmd); |
| 767 |