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.
Commit
ff811934e078a75b2c533727764e837af13ab71b9491fd50c6b7cd209cd7dfd1
Parent
13cfef3383968d3…
1 file changed
-9
M
src/db.c
-9
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -3303,16 +3303,10 @@ | ||
| 3303 | 3303 | ** --repodir DIR If REPOSITORY is a URI that will be cloned, store |
| 3304 | 3304 | ** the clone in DIR rather than in "." |
| 3305 | 3305 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 3306 | 3306 | ** times (the timestamp of the last checkin which modified |
| 3307 | 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 | 3308 | ** --workdir DIR Use DIR as the working directory instead of ".". The DIR |
| 3315 | 3309 | ** directory is created if it does not exist. |
| 3316 | 3310 | ** |
| 3317 | 3311 | ** See also: [[close]], [[clone]] |
| 3318 | 3312 | */ |
| @@ -3319,11 +3313,10 @@ | ||
| 3319 | 3313 | void cmd_open(void){ |
| 3320 | 3314 | int emptyFlag; |
| 3321 | 3315 | int keepFlag; |
| 3322 | 3316 | int forceMissingFlag; |
| 3323 | 3317 | int allowNested; |
| 3324 | - int allowSymlinks = 0; | |
| 3325 | 3318 | int setmtimeFlag; /* --setmtime. Set mtimes on files */ |
| 3326 | 3319 | int bForce = 0; /* --force. Open even if non-empty dir */ |
| 3327 | 3320 | static char *azNewArgv[] = { 0, "checkout", "--prompt", 0, 0, 0, 0 }; |
| 3328 | 3321 | const char *zWorkDir; /* --workdir value */ |
| 3329 | 3322 | const char *zRepo = 0; /* Name of the repository file */ |
| @@ -3338,11 +3331,10 @@ | ||
| 3338 | 3331 | allowNested = find_option("nested",0,0)!=0; |
| 3339 | 3332 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 3340 | 3333 | zWorkDir = find_option("workdir",0,1); |
| 3341 | 3334 | zRepoDir = find_option("repodir",0,1); |
| 3342 | 3335 | bForce = find_option("force","f",0)!=0; |
| 3343 | - if( find_option("symlinks",0,0)!=0 ) allowSymlinks = 1; | |
| 3344 | 3336 | zPwd = file_getcwd(0,0); |
| 3345 | 3337 | |
| 3346 | 3338 | |
| 3347 | 3339 | /* We should be done with options.. */ |
| 3348 | 3340 | verify_all_options(); |
| @@ -3444,11 +3436,10 @@ | ||
| 3444 | 3436 | "COMMIT; PRAGMA journal_mode=WAL; BEGIN;", |
| 3445 | 3437 | #endif |
| 3446 | 3438 | (char*)0); |
| 3447 | 3439 | db_delete_on_failure(LOCALDB_NAME); |
| 3448 | 3440 | db_open_local(0); |
| 3449 | - if( allowSymlinks ) g.allowSymlinks = 1; | |
| 3450 | 3441 | db_lset("repository", zRepo); |
| 3451 | 3442 | db_record_repository_filename(zRepo); |
| 3452 | 3443 | db_set_checkout(0); |
| 3453 | 3444 | azNewArgv[0] = g.argv[0]; |
| 3454 | 3445 | g.argv = azNewArgv; |
| 3455 | 3446 |
| --- 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 |