Fossil SCM

Remove the --symlinks option from the "fossil open" command. It is not needed. Users who want to enable symlinks can use the "fossil settings" command first.

drh 2020-08-19 15:26 sec2020
Commit ff811934e078a75b2c533727764e837af13ab71b9491fd50c6b7cd209cd7dfd1
1 file changed -9
-9
--- src/db.c
+++ src/db.c
@@ -3303,16 +3303,10 @@
33033303
** --repodir DIR If REPOSITORY is a URI that will be cloned, store
33043304
** the clone in DIR rather than in "."
33053305
** --setmtime Set timestamps of all files to match their SCM-side
33063306
** times (the timestamp of the last checkin which modified
33073307
** them).
3308
-** --symlinks Allow the use of symbolic links when expanding files
3309
-** in this check-out, overriding the global allow-symlinks
3310
-** setting (which default to "off"). CAUTION: This option
3311
-** might allow a malicious repository to overwrite files
3312
-** outside of the checkout directory. This option is a
3313
-** security risk and its use is discouraged.
33143308
** --workdir DIR Use DIR as the working directory instead of ".". The DIR
33153309
** directory is created if it does not exist.
33163310
**
33173311
** See also: [[close]], [[clone]]
33183312
*/
@@ -3319,11 +3313,10 @@
33193313
void cmd_open(void){
33203314
int emptyFlag;
33213315
int keepFlag;
33223316
int forceMissingFlag;
33233317
int allowNested;
3324
- int allowSymlinks = 0;
33253318
int setmtimeFlag; /* --setmtime. Set mtimes on files */
33263319
int bForce = 0; /* --force. Open even if non-empty dir */
33273320
static char *azNewArgv[] = { 0, "checkout", "--prompt", 0, 0, 0, 0 };
33283321
const char *zWorkDir; /* --workdir value */
33293322
const char *zRepo = 0; /* Name of the repository file */
@@ -3338,11 +3331,10 @@
33383331
allowNested = find_option("nested",0,0)!=0;
33393332
setmtimeFlag = find_option("setmtime",0,0)!=0;
33403333
zWorkDir = find_option("workdir",0,1);
33413334
zRepoDir = find_option("repodir",0,1);
33423335
bForce = find_option("force","f",0)!=0;
3343
- if( find_option("symlinks",0,0)!=0 ) allowSymlinks = 1;
33443336
zPwd = file_getcwd(0,0);
33453337
33463338
33473339
/* We should be done with options.. */
33483340
verify_all_options();
@@ -3444,11 +3436,10 @@
34443436
"COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
34453437
#endif
34463438
(char*)0);
34473439
db_delete_on_failure(LOCALDB_NAME);
34483440
db_open_local(0);
3449
- if( allowSymlinks ) g.allowSymlinks = 1;
34503441
db_lset("repository", zRepo);
34513442
db_record_repository_filename(zRepo);
34523443
db_set_checkout(0);
34533444
azNewArgv[0] = g.argv[0];
34543445
g.argv = azNewArgv;
34553446
--- src/db.c
+++ src/db.c
@@ -3303,16 +3303,10 @@
3303 ** --repodir DIR If REPOSITORY is a URI that will be cloned, store
3304 ** the clone in DIR rather than in "."
3305 ** --setmtime Set timestamps of all files to match their SCM-side
3306 ** times (the timestamp of the last checkin which modified
3307 ** them).
3308 ** --symlinks Allow the use of symbolic links when expanding files
3309 ** in this check-out, overriding the global allow-symlinks
3310 ** setting (which default to "off"). CAUTION: This option
3311 ** might allow a malicious repository to overwrite files
3312 ** outside of the checkout directory. This option is a
3313 ** security risk and its use is discouraged.
3314 ** --workdir DIR Use DIR as the working directory instead of ".". The DIR
3315 ** directory is created if it does not exist.
3316 **
3317 ** See also: [[close]], [[clone]]
3318 */
@@ -3319,11 +3313,10 @@
3319 void cmd_open(void){
3320 int emptyFlag;
3321 int keepFlag;
3322 int forceMissingFlag;
3323 int allowNested;
3324 int allowSymlinks = 0;
3325 int setmtimeFlag; /* --setmtime. Set mtimes on files */
3326 int bForce = 0; /* --force. Open even if non-empty dir */
3327 static char *azNewArgv[] = { 0, "checkout", "--prompt", 0, 0, 0, 0 };
3328 const char *zWorkDir; /* --workdir value */
3329 const char *zRepo = 0; /* Name of the repository file */
@@ -3338,11 +3331,10 @@
3338 allowNested = find_option("nested",0,0)!=0;
3339 setmtimeFlag = find_option("setmtime",0,0)!=0;
3340 zWorkDir = find_option("workdir",0,1);
3341 zRepoDir = find_option("repodir",0,1);
3342 bForce = find_option("force","f",0)!=0;
3343 if( find_option("symlinks",0,0)!=0 ) allowSymlinks = 1;
3344 zPwd = file_getcwd(0,0);
3345
3346
3347 /* We should be done with options.. */
3348 verify_all_options();
@@ -3444,11 +3436,10 @@
3444 "COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
3445 #endif
3446 (char*)0);
3447 db_delete_on_failure(LOCALDB_NAME);
3448 db_open_local(0);
3449 if( allowSymlinks ) g.allowSymlinks = 1;
3450 db_lset("repository", zRepo);
3451 db_record_repository_filename(zRepo);
3452 db_set_checkout(0);
3453 azNewArgv[0] = g.argv[0];
3454 g.argv = azNewArgv;
3455
--- src/db.c
+++ src/db.c
@@ -3303,16 +3303,10 @@
3303 ** --repodir DIR If REPOSITORY is a URI that will be cloned, store
3304 ** the clone in DIR rather than in "."
3305 ** --setmtime Set timestamps of all files to match their SCM-side
3306 ** times (the timestamp of the last checkin which modified
3307 ** them).
 
 
 
 
 
 
3308 ** --workdir DIR Use DIR as the working directory instead of ".". The DIR
3309 ** directory is created if it does not exist.
3310 **
3311 ** See also: [[close]], [[clone]]
3312 */
@@ -3319,11 +3313,10 @@
3313 void cmd_open(void){
3314 int emptyFlag;
3315 int keepFlag;
3316 int forceMissingFlag;
3317 int allowNested;
 
3318 int setmtimeFlag; /* --setmtime. Set mtimes on files */
3319 int bForce = 0; /* --force. Open even if non-empty dir */
3320 static char *azNewArgv[] = { 0, "checkout", "--prompt", 0, 0, 0, 0 };
3321 const char *zWorkDir; /* --workdir value */
3322 const char *zRepo = 0; /* Name of the repository file */
@@ -3338,11 +3331,10 @@
3331 allowNested = find_option("nested",0,0)!=0;
3332 setmtimeFlag = find_option("setmtime",0,0)!=0;
3333 zWorkDir = find_option("workdir",0,1);
3334 zRepoDir = find_option("repodir",0,1);
3335 bForce = find_option("force","f",0)!=0;
 
3336 zPwd = file_getcwd(0,0);
3337
3338
3339 /* We should be done with options.. */
3340 verify_all_options();
@@ -3444,11 +3436,10 @@
3436 "COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
3437 #endif
3438 (char*)0);
3439 db_delete_on_failure(LOCALDB_NAME);
3440 db_open_local(0);
 
3441 db_lset("repository", zRepo);
3442 db_record_repository_filename(zRepo);
3443 db_set_checkout(0);
3444 azNewArgv[0] = g.argv[0];
3445 g.argv = azNewArgv;
3446

Keyboard Shortcuts

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