Fossil SCM
Added db_unprotect/pop wrappers around the "clone --ssh-command" handling to avoid a bogus "unauthorized change to protected setting" error, as reported [forum:/forumpost/29027c6a67c280e7 | on the forum].
Commit
d700f5ff4f215c6941d4466b2cb17bd3dc3bf818c4d6c1e21d78d2b8d21d3cf8
Parent
7aaee6fc3198310…
1 file changed
+4
+4
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -353,11 +353,13 @@ | ||
| 353 | 353 | ** Look for SSH clone command line options and setup in globals. |
| 354 | 354 | */ |
| 355 | 355 | void clone_ssh_find_options(void){ |
| 356 | 356 | const char *zSshCmd; /* SSH command string */ |
| 357 | 357 | |
| 358 | + db_unprotect(PROTECT_ALL); | |
| 358 | 359 | zSshCmd = find_option("ssh-command","c",1); |
| 360 | + db_protect_pop(); | |
| 359 | 361 | if( zSshCmd && zSshCmd[0] ){ |
| 360 | 362 | g.zSshCmd = mprintf("%s", zSshCmd); |
| 361 | 363 | } |
| 362 | 364 | } |
| 363 | 365 | |
| @@ -365,11 +367,13 @@ | ||
| 365 | 367 | ** Set SSH options discovered in global variables (set from command line |
| 366 | 368 | ** options). |
| 367 | 369 | */ |
| 368 | 370 | void clone_ssh_db_set_options(void){ |
| 369 | 371 | if( g.zSshCmd && g.zSshCmd[0] ){ |
| 372 | + db_unprotect(PROTECT_ALL); | |
| 370 | 373 | db_set("ssh-command", g.zSshCmd, 0); |
| 374 | + db_protect_pop(); | |
| 371 | 375 | } |
| 372 | 376 | } |
| 373 | 377 | |
| 374 | 378 | /* |
| 375 | 379 | ** WEBPAGE: download |
| 376 | 380 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -353,11 +353,13 @@ | |
| 353 | ** Look for SSH clone command line options and setup in globals. |
| 354 | */ |
| 355 | void clone_ssh_find_options(void){ |
| 356 | const char *zSshCmd; /* SSH command string */ |
| 357 | |
| 358 | zSshCmd = find_option("ssh-command","c",1); |
| 359 | if( zSshCmd && zSshCmd[0] ){ |
| 360 | g.zSshCmd = mprintf("%s", zSshCmd); |
| 361 | } |
| 362 | } |
| 363 | |
| @@ -365,11 +367,13 @@ | |
| 365 | ** Set SSH options discovered in global variables (set from command line |
| 366 | ** options). |
| 367 | */ |
| 368 | void clone_ssh_db_set_options(void){ |
| 369 | if( g.zSshCmd && g.zSshCmd[0] ){ |
| 370 | db_set("ssh-command", g.zSshCmd, 0); |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | /* |
| 375 | ** WEBPAGE: download |
| 376 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -353,11 +353,13 @@ | |
| 353 | ** Look for SSH clone command line options and setup in globals. |
| 354 | */ |
| 355 | void clone_ssh_find_options(void){ |
| 356 | const char *zSshCmd; /* SSH command string */ |
| 357 | |
| 358 | db_unprotect(PROTECT_ALL); |
| 359 | zSshCmd = find_option("ssh-command","c",1); |
| 360 | db_protect_pop(); |
| 361 | if( zSshCmd && zSshCmd[0] ){ |
| 362 | g.zSshCmd = mprintf("%s", zSshCmd); |
| 363 | } |
| 364 | } |
| 365 | |
| @@ -365,11 +367,13 @@ | |
| 367 | ** Set SSH options discovered in global variables (set from command line |
| 368 | ** options). |
| 369 | */ |
| 370 | void clone_ssh_db_set_options(void){ |
| 371 | if( g.zSshCmd && g.zSshCmd[0] ){ |
| 372 | db_unprotect(PROTECT_ALL); |
| 373 | db_set("ssh-command", g.zSshCmd, 0); |
| 374 | db_protect_pop(); |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | /* |
| 379 | ** WEBPAGE: download |
| 380 |