Fossil SCM

When using --once with --ssh-command, prefer the command-line argument over the stored option. Addresses [forum:90c1f5fef258c704 | forum post 90c1f5fef258c704].

andybradford 2024-11-22 15:11 trunk
Commit f019cb5fc3f0b5f3fa438d760ff9dfd00deccfda63d7dc8adabaf1d2c1e1306b
1 file changed +4 -1
--- src/http_transport.c
+++ src/http_transport.c
@@ -103,11 +103,14 @@
103103
/*
104104
** Initialize a Blob to the name of the configured SSH command.
105105
*/
106106
void transport_ssh_command(Blob *p){
107107
char *zSsh; /* The base SSH command */
108
- zSsh = db_get("ssh-command", zDefaultSshCmd);
108
+ zSsh = g.zSshCmd;
109
+ if( zSsh==0 && zSsh[0]==0 ){
110
+ zSsh = db_get("ssh-command", zDefaultSshCmd);
111
+ }
109112
blob_init(p, zSsh, -1);
110113
}
111114
112115
/*
113116
** SSH initialization of the transport layer
114117
--- src/http_transport.c
+++ src/http_transport.c
@@ -103,11 +103,14 @@
103 /*
104 ** Initialize a Blob to the name of the configured SSH command.
105 */
106 void transport_ssh_command(Blob *p){
107 char *zSsh; /* The base SSH command */
108 zSsh = db_get("ssh-command", zDefaultSshCmd);
 
 
 
109 blob_init(p, zSsh, -1);
110 }
111
112 /*
113 ** SSH initialization of the transport layer
114
--- src/http_transport.c
+++ src/http_transport.c
@@ -103,11 +103,14 @@
103 /*
104 ** Initialize a Blob to the name of the configured SSH command.
105 */
106 void transport_ssh_command(Blob *p){
107 char *zSsh; /* The base SSH command */
108 zSsh = g.zSshCmd;
109 if( zSsh==0 && zSsh[0]==0 ){
110 zSsh = db_get("ssh-command", zDefaultSshCmd);
111 }
112 blob_init(p, zSsh, -1);
113 }
114
115 /*
116 ** SSH initialization of the transport layer
117

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button