Fossil SCM
Add the --no-symlinks global command line option.
Commit
85277aa3b3239d416dc54448d69c082bf0319836
Parent
8b562b90c05a0c3…
10 files changed
+8
+20
-2
+3
-2
+2
+2
+1
+2
+3
+2
+4
+8
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -276,10 +276,12 @@ | ||
| 276 | 276 | ** -f|--force Add files without prompting |
| 277 | 277 | ** --ignore <CSG> Ignore files matching patterns from the |
| 278 | 278 | ** comma separated list of glob patterns. |
| 279 | 279 | ** --clean <CSG> Also ignore files matching patterns from |
| 280 | 280 | ** the comma separated list of glob patterns. |
| 281 | +** --no-symlinks Disables support for symlinks, overriding | |
| 282 | +** the "allow-symlinks" option. | |
| 281 | 283 | ** |
| 282 | 284 | ** See also: addremove, rm |
| 283 | 285 | */ |
| 284 | 286 | void add_cmd(void){ |
| 285 | 287 | int i; /* Loop counter */ |
| @@ -441,10 +443,12 @@ | ||
| 441 | 443 | ** --soft Skip removing files from the checkout. |
| 442 | 444 | ** This supersedes the --hard option. |
| 443 | 445 | ** --hard Remove files from the checkout. |
| 444 | 446 | ** --case-sensitive <BOOL> Override the case-sensitive setting. |
| 445 | 447 | ** -n|--dry-run If given, display instead of run actions. |
| 448 | +** --no-symlinks Disables support for symlinks, overriding | |
| 449 | +** the "allow-symlinks" option. | |
| 446 | 450 | ** |
| 447 | 451 | ** See also: addremove, add |
| 448 | 452 | */ |
| 449 | 453 | void delete_cmd(void){ |
| 450 | 454 | int i; |
| @@ -622,10 +626,12 @@ | ||
| 622 | 626 | ** --ignore <CSG> Ignore files matching patterns from the |
| 623 | 627 | ** comma separated list of glob patterns. |
| 624 | 628 | ** --clean <CSG> Also ignore files matching patterns from |
| 625 | 629 | ** the comma separated list of glob patterns. |
| 626 | 630 | ** -n|--dry-run If given, display instead of run actions. |
| 631 | +** --no-symlinks Disables support for symlinks, overriding | |
| 632 | +** the "allow-symlinks" option. | |
| 627 | 633 | ** |
| 628 | 634 | ** See also: add, rm |
| 629 | 635 | */ |
| 630 | 636 | void addremove_cmd(void){ |
| 631 | 637 | Blob path; |
| @@ -849,10 +855,12 @@ | ||
| 849 | 855 | ** --soft Skip moving files within the checkout. |
| 850 | 856 | ** This supersedes the --hard option. |
| 851 | 857 | ** --hard Move files within the checkout. |
| 852 | 858 | ** --case-sensitive <BOOL> Override the case-sensitive setting. |
| 853 | 859 | ** -n|--dry-run If given, display instead of run actions. |
| 860 | +** --no-symlinks Disables support for symlinks, overriding | |
| 861 | +** the "allow-symlinks" option. | |
| 854 | 862 | ** |
| 855 | 863 | ** See also: changes, status |
| 856 | 864 | */ |
| 857 | 865 | void mv_cmd(void){ |
| 858 | 866 | int i; |
| 859 | 867 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -276,10 +276,12 @@ | |
| 276 | ** -f|--force Add files without prompting |
| 277 | ** --ignore <CSG> Ignore files matching patterns from the |
| 278 | ** comma separated list of glob patterns. |
| 279 | ** --clean <CSG> Also ignore files matching patterns from |
| 280 | ** the comma separated list of glob patterns. |
| 281 | ** |
| 282 | ** See also: addremove, rm |
| 283 | */ |
| 284 | void add_cmd(void){ |
| 285 | int i; /* Loop counter */ |
| @@ -441,10 +443,12 @@ | |
| 441 | ** --soft Skip removing files from the checkout. |
| 442 | ** This supersedes the --hard option. |
| 443 | ** --hard Remove files from the checkout. |
| 444 | ** --case-sensitive <BOOL> Override the case-sensitive setting. |
| 445 | ** -n|--dry-run If given, display instead of run actions. |
| 446 | ** |
| 447 | ** See also: addremove, add |
| 448 | */ |
| 449 | void delete_cmd(void){ |
| 450 | int i; |
| @@ -622,10 +626,12 @@ | |
| 622 | ** --ignore <CSG> Ignore files matching patterns from the |
| 623 | ** comma separated list of glob patterns. |
| 624 | ** --clean <CSG> Also ignore files matching patterns from |
| 625 | ** the comma separated list of glob patterns. |
| 626 | ** -n|--dry-run If given, display instead of run actions. |
| 627 | ** |
| 628 | ** See also: add, rm |
| 629 | */ |
| 630 | void addremove_cmd(void){ |
| 631 | Blob path; |
| @@ -849,10 +855,12 @@ | |
| 849 | ** --soft Skip moving files within the checkout. |
| 850 | ** This supersedes the --hard option. |
| 851 | ** --hard Move files within the checkout. |
| 852 | ** --case-sensitive <BOOL> Override the case-sensitive setting. |
| 853 | ** -n|--dry-run If given, display instead of run actions. |
| 854 | ** |
| 855 | ** See also: changes, status |
| 856 | */ |
| 857 | void mv_cmd(void){ |
| 858 | int i; |
| 859 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -276,10 +276,12 @@ | |
| 276 | ** -f|--force Add files without prompting |
| 277 | ** --ignore <CSG> Ignore files matching patterns from the |
| 278 | ** comma separated list of glob patterns. |
| 279 | ** --clean <CSG> Also ignore files matching patterns from |
| 280 | ** the comma separated list of glob patterns. |
| 281 | ** --no-symlinks Disables support for symlinks, overriding |
| 282 | ** the "allow-symlinks" option. |
| 283 | ** |
| 284 | ** See also: addremove, rm |
| 285 | */ |
| 286 | void add_cmd(void){ |
| 287 | int i; /* Loop counter */ |
| @@ -441,10 +443,12 @@ | |
| 443 | ** --soft Skip removing files from the checkout. |
| 444 | ** This supersedes the --hard option. |
| 445 | ** --hard Remove files from the checkout. |
| 446 | ** --case-sensitive <BOOL> Override the case-sensitive setting. |
| 447 | ** -n|--dry-run If given, display instead of run actions. |
| 448 | ** --no-symlinks Disables support for symlinks, overriding |
| 449 | ** the "allow-symlinks" option. |
| 450 | ** |
| 451 | ** See also: addremove, add |
| 452 | */ |
| 453 | void delete_cmd(void){ |
| 454 | int i; |
| @@ -622,10 +626,12 @@ | |
| 626 | ** --ignore <CSG> Ignore files matching patterns from the |
| 627 | ** comma separated list of glob patterns. |
| 628 | ** --clean <CSG> Also ignore files matching patterns from |
| 629 | ** the comma separated list of glob patterns. |
| 630 | ** -n|--dry-run If given, display instead of run actions. |
| 631 | ** --no-symlinks Disables support for symlinks, overriding |
| 632 | ** the "allow-symlinks" option. |
| 633 | ** |
| 634 | ** See also: add, rm |
| 635 | */ |
| 636 | void addremove_cmd(void){ |
| 637 | Blob path; |
| @@ -849,10 +855,12 @@ | |
| 855 | ** --soft Skip moving files within the checkout. |
| 856 | ** This supersedes the --hard option. |
| 857 | ** --hard Move files within the checkout. |
| 858 | ** --case-sensitive <BOOL> Override the case-sensitive setting. |
| 859 | ** -n|--dry-run If given, display instead of run actions. |
| 860 | ** --no-symlinks Disables support for symlinks, overriding |
| 861 | ** the "allow-symlinks" option. |
| 862 | ** |
| 863 | ** See also: changes, status |
| 864 | */ |
| 865 | void mv_cmd(void){ |
| 866 | int i; |
| 867 |
+20
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -417,10 +417,12 @@ | ||
| 417 | 417 | ** --sha1sum Verify file status using SHA1 hashing rather than |
| 418 | 418 | ** relying on file mtimes. |
| 419 | 419 | ** --case-sensitive <BOOL> Override case-sensitive setting. |
| 420 | 420 | ** --dotfiles Include unmanaged files beginning with a dot. |
| 421 | 421 | ** --ignore <CSG> Ignore unmanaged files matching CSG glob patterns. |
| 422 | +** --no-symlinks Disables support for symlinks, overriding | |
| 423 | +** the "allow-symlinks" option. | |
| 422 | 424 | ** |
| 423 | 425 | ** Options specific to the changes command: |
| 424 | 426 | ** --header Identify the repository if report is non-empty. |
| 425 | 427 | ** -v|--verbose Say "(none)" if the change report is empty. |
| 426 | 428 | ** --classify Start each line with the file's change type. |
| @@ -824,10 +826,12 @@ | ||
| 824 | 826 | ** --abs-paths Display absolute pathnames. |
| 825 | 827 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 826 | 828 | ** --dotfiles include files beginning with a dot (".") |
| 827 | 829 | ** --header Identify the repository if there are extras |
| 828 | 830 | ** --ignore <CSG> ignore files matching patterns from the argument |
| 831 | +** --no-symlinks Disables support for symlinks, overriding | |
| 832 | +** the "allow-symlinks" option. | |
| 829 | 833 | ** --rel-paths Display pathnames relative to the current working |
| 830 | 834 | ** directory. |
| 831 | 835 | ** |
| 832 | 836 | ** See also: changes, clean, status |
| 833 | 837 | */ |
| @@ -853,13 +857,19 @@ | ||
| 853 | 857 | |
| 854 | 858 | if( zIgnoreFlag==0 ){ |
| 855 | 859 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 856 | 860 | } |
| 857 | 861 | pIgnore = glob_create(zIgnoreFlag); |
| 862 | + | |
| 863 | + /* | |
| 864 | + ** Always consider symlinks, unless we are explicitly forbidden from | |
| 865 | + ** doing so (i.e. via the command line). | |
| 866 | + */ | |
| 867 | + g.allowSymlinks = db_allow_symlinks_by_default(); | |
| 868 | + | |
| 858 | 869 | locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore); |
| 859 | 870 | glob_free(pIgnore); |
| 860 | - g.allowSymlinks = 1; /* Report on symbolic links */ | |
| 861 | 871 | |
| 862 | 872 | blob_zero(&report); |
| 863 | 873 | status_report(&report, flags); |
| 864 | 874 | if( blob_size(&report) ){ |
| 865 | 875 | if( showHdr ){ |
| @@ -947,10 +957,12 @@ | ||
| 947 | 957 | ** list of glob patterns. |
| 948 | 958 | ** -n|--dry-run Delete nothing, but display what would have been |
| 949 | 959 | ** deleted. |
| 950 | 960 | ** --no-prompt This option disables prompting the user for input |
| 951 | 961 | ** and assumes an answer of 'No' for every question. |
| 962 | +** --no-symlinks Disables support for symlinks, overriding | |
| 963 | +** the "allow-symlinks" option. | |
| 952 | 964 | ** --temp Remove only Fossil-generated temporary files. |
| 953 | 965 | ** -v|--verbose Show all files as they are removed. |
| 954 | 966 | ** |
| 955 | 967 | ** See also: addremove, extras, status |
| 956 | 968 | */ |
| @@ -1011,11 +1023,17 @@ | ||
| 1011 | 1023 | verify_all_options(); |
| 1012 | 1024 | pIgnore = glob_create(zIgnoreFlag); |
| 1013 | 1025 | pKeep = glob_create(zKeepFlag); |
| 1014 | 1026 | pClean = glob_create(zCleanFlag); |
| 1015 | 1027 | nRoot = (int)strlen(g.zLocalRoot); |
| 1016 | - g.allowSymlinks = 1; /* Find symlinks too */ | |
| 1028 | + | |
| 1029 | + /* | |
| 1030 | + ** Always consider symlinks, unless we are explicitly forbidden from | |
| 1031 | + ** doing so (i.e. via the command line). | |
| 1032 | + */ | |
| 1033 | + g.allowSymlinks = db_allow_symlinks_by_default(); | |
| 1034 | + | |
| 1017 | 1035 | if( !dirsOnlyFlag ){ |
| 1018 | 1036 | Stmt q; |
| 1019 | 1037 | Blob repo; |
| 1020 | 1038 | if( !dryRunFlag && !disableUndo ) undo_begin(); |
| 1021 | 1039 | locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore); |
| 1022 | 1040 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -417,10 +417,12 @@ | |
| 417 | ** --sha1sum Verify file status using SHA1 hashing rather than |
| 418 | ** relying on file mtimes. |
| 419 | ** --case-sensitive <BOOL> Override case-sensitive setting. |
| 420 | ** --dotfiles Include unmanaged files beginning with a dot. |
| 421 | ** --ignore <CSG> Ignore unmanaged files matching CSG glob patterns. |
| 422 | ** |
| 423 | ** Options specific to the changes command: |
| 424 | ** --header Identify the repository if report is non-empty. |
| 425 | ** -v|--verbose Say "(none)" if the change report is empty. |
| 426 | ** --classify Start each line with the file's change type. |
| @@ -824,10 +826,12 @@ | |
| 824 | ** --abs-paths Display absolute pathnames. |
| 825 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 826 | ** --dotfiles include files beginning with a dot (".") |
| 827 | ** --header Identify the repository if there are extras |
| 828 | ** --ignore <CSG> ignore files matching patterns from the argument |
| 829 | ** --rel-paths Display pathnames relative to the current working |
| 830 | ** directory. |
| 831 | ** |
| 832 | ** See also: changes, clean, status |
| 833 | */ |
| @@ -853,13 +857,19 @@ | |
| 853 | |
| 854 | if( zIgnoreFlag==0 ){ |
| 855 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 856 | } |
| 857 | pIgnore = glob_create(zIgnoreFlag); |
| 858 | locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore); |
| 859 | glob_free(pIgnore); |
| 860 | g.allowSymlinks = 1; /* Report on symbolic links */ |
| 861 | |
| 862 | blob_zero(&report); |
| 863 | status_report(&report, flags); |
| 864 | if( blob_size(&report) ){ |
| 865 | if( showHdr ){ |
| @@ -947,10 +957,12 @@ | |
| 947 | ** list of glob patterns. |
| 948 | ** -n|--dry-run Delete nothing, but display what would have been |
| 949 | ** deleted. |
| 950 | ** --no-prompt This option disables prompting the user for input |
| 951 | ** and assumes an answer of 'No' for every question. |
| 952 | ** --temp Remove only Fossil-generated temporary files. |
| 953 | ** -v|--verbose Show all files as they are removed. |
| 954 | ** |
| 955 | ** See also: addremove, extras, status |
| 956 | */ |
| @@ -1011,11 +1023,17 @@ | |
| 1011 | verify_all_options(); |
| 1012 | pIgnore = glob_create(zIgnoreFlag); |
| 1013 | pKeep = glob_create(zKeepFlag); |
| 1014 | pClean = glob_create(zCleanFlag); |
| 1015 | nRoot = (int)strlen(g.zLocalRoot); |
| 1016 | g.allowSymlinks = 1; /* Find symlinks too */ |
| 1017 | if( !dirsOnlyFlag ){ |
| 1018 | Stmt q; |
| 1019 | Blob repo; |
| 1020 | if( !dryRunFlag && !disableUndo ) undo_begin(); |
| 1021 | locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore); |
| 1022 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -417,10 +417,12 @@ | |
| 417 | ** --sha1sum Verify file status using SHA1 hashing rather than |
| 418 | ** relying on file mtimes. |
| 419 | ** --case-sensitive <BOOL> Override case-sensitive setting. |
| 420 | ** --dotfiles Include unmanaged files beginning with a dot. |
| 421 | ** --ignore <CSG> Ignore unmanaged files matching CSG glob patterns. |
| 422 | ** --no-symlinks Disables support for symlinks, overriding |
| 423 | ** the "allow-symlinks" option. |
| 424 | ** |
| 425 | ** Options specific to the changes command: |
| 426 | ** --header Identify the repository if report is non-empty. |
| 427 | ** -v|--verbose Say "(none)" if the change report is empty. |
| 428 | ** --classify Start each line with the file's change type. |
| @@ -824,10 +826,12 @@ | |
| 826 | ** --abs-paths Display absolute pathnames. |
| 827 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 828 | ** --dotfiles include files beginning with a dot (".") |
| 829 | ** --header Identify the repository if there are extras |
| 830 | ** --ignore <CSG> ignore files matching patterns from the argument |
| 831 | ** --no-symlinks Disables support for symlinks, overriding |
| 832 | ** the "allow-symlinks" option. |
| 833 | ** --rel-paths Display pathnames relative to the current working |
| 834 | ** directory. |
| 835 | ** |
| 836 | ** See also: changes, clean, status |
| 837 | */ |
| @@ -853,13 +857,19 @@ | |
| 857 | |
| 858 | if( zIgnoreFlag==0 ){ |
| 859 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 860 | } |
| 861 | pIgnore = glob_create(zIgnoreFlag); |
| 862 | |
| 863 | /* |
| 864 | ** Always consider symlinks, unless we are explicitly forbidden from |
| 865 | ** doing so (i.e. via the command line). |
| 866 | */ |
| 867 | g.allowSymlinks = db_allow_symlinks_by_default(); |
| 868 | |
| 869 | locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore); |
| 870 | glob_free(pIgnore); |
| 871 | |
| 872 | blob_zero(&report); |
| 873 | status_report(&report, flags); |
| 874 | if( blob_size(&report) ){ |
| 875 | if( showHdr ){ |
| @@ -947,10 +957,12 @@ | |
| 957 | ** list of glob patterns. |
| 958 | ** -n|--dry-run Delete nothing, but display what would have been |
| 959 | ** deleted. |
| 960 | ** --no-prompt This option disables prompting the user for input |
| 961 | ** and assumes an answer of 'No' for every question. |
| 962 | ** --no-symlinks Disables support for symlinks, overriding |
| 963 | ** the "allow-symlinks" option. |
| 964 | ** --temp Remove only Fossil-generated temporary files. |
| 965 | ** -v|--verbose Show all files as they are removed. |
| 966 | ** |
| 967 | ** See also: addremove, extras, status |
| 968 | */ |
| @@ -1011,11 +1023,17 @@ | |
| 1023 | verify_all_options(); |
| 1024 | pIgnore = glob_create(zIgnoreFlag); |
| 1025 | pKeep = glob_create(zKeepFlag); |
| 1026 | pClean = glob_create(zCleanFlag); |
| 1027 | nRoot = (int)strlen(g.zLocalRoot); |
| 1028 | |
| 1029 | /* |
| 1030 | ** Always consider symlinks, unless we are explicitly forbidden from |
| 1031 | ** doing so (i.e. via the command line). |
| 1032 | */ |
| 1033 | g.allowSymlinks = db_allow_symlinks_by_default(); |
| 1034 | |
| 1035 | if( !dirsOnlyFlag ){ |
| 1036 | Stmt q; |
| 1037 | Blob repo; |
| 1038 | if( !dryRunFlag && !disableUndo ) undo_begin(); |
| 1039 | locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore); |
| 1040 |
M
src/db.c
+3
-2
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1423,17 +1423,18 @@ | ||
| 1423 | 1423 | return zRepo; |
| 1424 | 1424 | } |
| 1425 | 1425 | |
| 1426 | 1426 | /* |
| 1427 | 1427 | ** Returns non-zero if the default value for the "allow-symlinks" setting |
| 1428 | -** is "on". | |
| 1428 | +** is "on". When on Windows, this always returns false. Otherwise, this | |
| 1429 | +** value will be impacted by the "--no-symlinks" global command line option. | |
| 1429 | 1430 | */ |
| 1430 | 1431 | int db_allow_symlinks_by_default(void){ |
| 1431 | 1432 | #if defined(_WIN32) |
| 1432 | 1433 | return 0; |
| 1433 | 1434 | #else |
| 1434 | - return 1; | |
| 1435 | + return !g.fNoSymlinks; | |
| 1435 | 1436 | #endif |
| 1436 | 1437 | } |
| 1437 | 1438 | |
| 1438 | 1439 | /* |
| 1439 | 1440 | ** Open the repository database given by zDbName. If zDbName==NULL then |
| 1440 | 1441 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1423,17 +1423,18 @@ | |
| 1423 | return zRepo; |
| 1424 | } |
| 1425 | |
| 1426 | /* |
| 1427 | ** Returns non-zero if the default value for the "allow-symlinks" setting |
| 1428 | ** is "on". |
| 1429 | */ |
| 1430 | int db_allow_symlinks_by_default(void){ |
| 1431 | #if defined(_WIN32) |
| 1432 | return 0; |
| 1433 | #else |
| 1434 | return 1; |
| 1435 | #endif |
| 1436 | } |
| 1437 | |
| 1438 | /* |
| 1439 | ** Open the repository database given by zDbName. If zDbName==NULL then |
| 1440 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1423,17 +1423,18 @@ | |
| 1423 | return zRepo; |
| 1424 | } |
| 1425 | |
| 1426 | /* |
| 1427 | ** Returns non-zero if the default value for the "allow-symlinks" setting |
| 1428 | ** is "on". When on Windows, this always returns false. Otherwise, this |
| 1429 | ** value will be impacted by the "--no-symlinks" global command line option. |
| 1430 | */ |
| 1431 | int db_allow_symlinks_by_default(void){ |
| 1432 | #if defined(_WIN32) |
| 1433 | return 0; |
| 1434 | #else |
| 1435 | return !g.fNoSymlinks; |
| 1436 | #endif |
| 1437 | } |
| 1438 | |
| 1439 | /* |
| 1440 | ** Open the repository database given by zDbName. If zDbName==NULL then |
| 1441 |
+2
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -1194,10 +1194,12 @@ | ||
| 1194 | 1194 | ** |
| 1195 | 1195 | ** Options: |
| 1196 | 1196 | ** --absolute Return an absolute path instead of a relative one. |
| 1197 | 1197 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is |
| 1198 | 1198 | ** a boolean: "yes", "no", "true", "false", etc. |
| 1199 | +** --no-symlinks Disables support for symlinks, overriding | |
| 1200 | +** the "allow-symlinks" option. | |
| 1199 | 1201 | */ |
| 1200 | 1202 | void cmd_test_tree_name(void){ |
| 1201 | 1203 | int i; |
| 1202 | 1204 | Blob x; |
| 1203 | 1205 | int absoluteFlag = find_option("absolute",0,0)!=0; |
| 1204 | 1206 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -1194,10 +1194,12 @@ | |
| 1194 | ** |
| 1195 | ** Options: |
| 1196 | ** --absolute Return an absolute path instead of a relative one. |
| 1197 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is |
| 1198 | ** a boolean: "yes", "no", "true", "false", etc. |
| 1199 | */ |
| 1200 | void cmd_test_tree_name(void){ |
| 1201 | int i; |
| 1202 | Blob x; |
| 1203 | int absoluteFlag = find_option("absolute",0,0)!=0; |
| 1204 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -1194,10 +1194,12 @@ | |
| 1194 | ** |
| 1195 | ** Options: |
| 1196 | ** --absolute Return an absolute path instead of a relative one. |
| 1197 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is |
| 1198 | ** a boolean: "yes", "no", "true", "false", etc. |
| 1199 | ** --no-symlinks Disables support for symlinks, overriding |
| 1200 | ** the "allow-symlinks" option. |
| 1201 | */ |
| 1202 | void cmd_test_tree_name(void){ |
| 1203 | int i; |
| 1204 | Blob x; |
| 1205 | int absoluteFlag = find_option("absolute",0,0)!=0; |
| 1206 |
+2
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -45,10 +45,12 @@ | ||
| 45 | 45 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 46 | 46 | ** boolean: "yes", "no", "true", "false", etc. |
| 47 | 47 | ** -l|--log select log mode (the default) |
| 48 | 48 | ** -n|--limit N Display the first N changes (default unlimited). |
| 49 | 49 | ** N<=0 means no limit. |
| 50 | +** --no-symlinks Disables support for symlinks, overriding | |
| 51 | +** the "allow-symlinks" option. | |
| 50 | 52 | ** --offset P skip P changes |
| 51 | 53 | ** -p|--print select print mode |
| 52 | 54 | ** -r|--revision R print the given revision (or ckout, if none is given) |
| 53 | 55 | ** to stdout (only in print mode) |
| 54 | 56 | ** -s|--status select status mode (print a status indicator for FILE) |
| 55 | 57 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -45,10 +45,12 @@ | |
| 45 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 46 | ** boolean: "yes", "no", "true", "false", etc. |
| 47 | ** -l|--log select log mode (the default) |
| 48 | ** -n|--limit N Display the first N changes (default unlimited). |
| 49 | ** N<=0 means no limit. |
| 50 | ** --offset P skip P changes |
| 51 | ** -p|--print select print mode |
| 52 | ** -r|--revision R print the given revision (or ckout, if none is given) |
| 53 | ** to stdout (only in print mode) |
| 54 | ** -s|--status select status mode (print a status indicator for FILE) |
| 55 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -45,10 +45,12 @@ | |
| 45 | ** --case-sensitive B Enable or disable case-sensitive filenames. B is a |
| 46 | ** boolean: "yes", "no", "true", "false", etc. |
| 47 | ** -l|--log select log mode (the default) |
| 48 | ** -n|--limit N Display the first N changes (default unlimited). |
| 49 | ** N<=0 means no limit. |
| 50 | ** --no-symlinks Disables support for symlinks, overriding |
| 51 | ** the "allow-symlinks" option. |
| 52 | ** --offset P skip P changes |
| 53 | ** -p|--print select print mode |
| 54 | ** -r|--revision R print the given revision (or ckout, if none is given) |
| 55 | ** to stdout (only in print mode) |
| 56 | ** -s|--status select status mode (print a status indicator for FILE) |
| 57 |
+1
| --- src/json.c | ||
| +++ src/json.c | ||
| @@ -1294,10 +1294,11 @@ | ||
| 1294 | 1294 | INT(g, okCsrf); |
| 1295 | 1295 | INT(g, thTrace); |
| 1296 | 1296 | INT(g, isHome); |
| 1297 | 1297 | INT(g, nAux); |
| 1298 | 1298 | INT(g, allowSymlinks); |
| 1299 | + INT(g, fNoSymlinks); | |
| 1299 | 1300 | |
| 1300 | 1301 | CSTR(g, zOpenRevision); |
| 1301 | 1302 | CSTR(g, zLocalRoot); |
| 1302 | 1303 | CSTR(g, zPath); |
| 1303 | 1304 | CSTR(g, zExtra); |
| 1304 | 1305 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1294,10 +1294,11 @@ | |
| 1294 | INT(g, okCsrf); |
| 1295 | INT(g, thTrace); |
| 1296 | INT(g, isHome); |
| 1297 | INT(g, nAux); |
| 1298 | INT(g, allowSymlinks); |
| 1299 | |
| 1300 | CSTR(g, zOpenRevision); |
| 1301 | CSTR(g, zLocalRoot); |
| 1302 | CSTR(g, zPath); |
| 1303 | CSTR(g, zExtra); |
| 1304 |
| --- src/json.c | |
| +++ src/json.c | |
| @@ -1294,10 +1294,11 @@ | |
| 1294 | INT(g, okCsrf); |
| 1295 | INT(g, thTrace); |
| 1296 | INT(g, isHome); |
| 1297 | INT(g, nAux); |
| 1298 | INT(g, allowSymlinks); |
| 1299 | INT(g, fNoSymlinks); |
| 1300 | |
| 1301 | CSTR(g, zOpenRevision); |
| 1302 | CSTR(g, zLocalRoot); |
| 1303 | CSTR(g, zPath); |
| 1304 | CSTR(g, zExtra); |
| 1305 |
+2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -227,10 +227,11 @@ | ||
| 227 | 227 | const char *azAuxVal[MX_AUX]; /* Value of each aux() or option() value */ |
| 228 | 228 | const char **azAuxOpt[MX_AUX]; /* Options of each option() value */ |
| 229 | 229 | int anAuxCols[MX_AUX]; /* Number of columns for option() values */ |
| 230 | 230 | |
| 231 | 231 | int allowSymlinks; /* Cached "allow-symlinks" option */ |
| 232 | + int fNoSymlinks; /* True if --no-symlinks flag is present */ | |
| 232 | 233 | |
| 233 | 234 | int mainTimerId; /* Set to fossil_timer_start() */ |
| 234 | 235 | #ifdef FOSSIL_ENABLE_JSON |
| 235 | 236 | struct FossilJsonBits { |
| 236 | 237 | int isJsonMode; /* True if running in JSON mode, else |
| @@ -613,10 +614,11 @@ | ||
| 613 | 614 | fossil_exit(1); |
| 614 | 615 | }else{ |
| 615 | 616 | const char *zChdir = find_option("chdir",0,1); |
| 616 | 617 | g.isHTTP = 0; |
| 617 | 618 | g.rcvid = 0; |
| 619 | + g.fNoSymlinks = find_option("no-symlinks", 0, 0)!=0; | |
| 618 | 620 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 619 | 621 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 620 | 622 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 621 | 623 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 622 | 624 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 623 | 625 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -227,10 +227,11 @@ | |
| 227 | const char *azAuxVal[MX_AUX]; /* Value of each aux() or option() value */ |
| 228 | const char **azAuxOpt[MX_AUX]; /* Options of each option() value */ |
| 229 | int anAuxCols[MX_AUX]; /* Number of columns for option() values */ |
| 230 | |
| 231 | int allowSymlinks; /* Cached "allow-symlinks" option */ |
| 232 | |
| 233 | int mainTimerId; /* Set to fossil_timer_start() */ |
| 234 | #ifdef FOSSIL_ENABLE_JSON |
| 235 | struct FossilJsonBits { |
| 236 | int isJsonMode; /* True if running in JSON mode, else |
| @@ -613,10 +614,11 @@ | |
| 613 | fossil_exit(1); |
| 614 | }else{ |
| 615 | const char *zChdir = find_option("chdir",0,1); |
| 616 | g.isHTTP = 0; |
| 617 | g.rcvid = 0; |
| 618 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 619 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 620 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 621 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 622 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 623 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -227,10 +227,11 @@ | |
| 227 | const char *azAuxVal[MX_AUX]; /* Value of each aux() or option() value */ |
| 228 | const char **azAuxOpt[MX_AUX]; /* Options of each option() value */ |
| 229 | int anAuxCols[MX_AUX]; /* Number of columns for option() values */ |
| 230 | |
| 231 | int allowSymlinks; /* Cached "allow-symlinks" option */ |
| 232 | int fNoSymlinks; /* True if --no-symlinks flag is present */ |
| 233 | |
| 234 | int mainTimerId; /* Set to fossil_timer_start() */ |
| 235 | #ifdef FOSSIL_ENABLE_JSON |
| 236 | struct FossilJsonBits { |
| 237 | int isJsonMode; /* True if running in JSON mode, else |
| @@ -613,10 +614,11 @@ | |
| 614 | fossil_exit(1); |
| 615 | }else{ |
| 616 | const char *zChdir = find_option("chdir",0,1); |
| 617 | g.isHTTP = 0; |
| 618 | g.rcvid = 0; |
| 619 | g.fNoSymlinks = find_option("no-symlinks", 0, 0)!=0; |
| 620 | g.fQuiet = find_option("quiet", 0, 0)!=0; |
| 621 | g.fSqlTrace = find_option("sqltrace", 0, 0)!=0; |
| 622 | g.fSqlStats = find_option("sqlstats", 0, 0)!=0; |
| 623 | g.fSystemTrace = find_option("systemtrace", 0, 0)!=0; |
| 624 | g.fSshTrace = find_option("sshtrace", 0, 0)!=0; |
| 625 |
+3
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -205,10 +205,13 @@ | ||
| 205 | 205 | ** -f|--force Force the merge even if it would be a no-op. |
| 206 | 206 | ** |
| 207 | 207 | ** --force-missing Force the merge even if there is missing content. |
| 208 | 208 | ** |
| 209 | 209 | ** --integrate Merged branch will be closed when committing. |
| 210 | +** | |
| 211 | +** --no-symlinks Disables support for symlinks, overriding | |
| 212 | +** the "allow-symlinks" option. | |
| 210 | 213 | ** |
| 211 | 214 | ** -n|--dry-run If given, display instead of run actions |
| 212 | 215 | ** |
| 213 | 216 | ** -v|--verbose Show additional details of the merge |
| 214 | 217 | */ |
| 215 | 218 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -205,10 +205,13 @@ | |
| 205 | ** -f|--force Force the merge even if it would be a no-op. |
| 206 | ** |
| 207 | ** --force-missing Force the merge even if there is missing content. |
| 208 | ** |
| 209 | ** --integrate Merged branch will be closed when committing. |
| 210 | ** |
| 211 | ** -n|--dry-run If given, display instead of run actions |
| 212 | ** |
| 213 | ** -v|--verbose Show additional details of the merge |
| 214 | */ |
| 215 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -205,10 +205,13 @@ | |
| 205 | ** -f|--force Force the merge even if it would be a no-op. |
| 206 | ** |
| 207 | ** --force-missing Force the merge even if there is missing content. |
| 208 | ** |
| 209 | ** --integrate Merged branch will be closed when committing. |
| 210 | ** |
| 211 | ** --no-symlinks Disables support for symlinks, overriding |
| 212 | ** the "allow-symlinks" option. |
| 213 | ** |
| 214 | ** -n|--dry-run If given, display instead of run actions |
| 215 | ** |
| 216 | ** -v|--verbose Show additional details of the merge |
| 217 | */ |
| 218 |
+2
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -95,10 +95,12 @@ | ||
| 95 | 95 | ** Options: |
| 96 | 96 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 97 | 97 | ** --debug print debug information on stdout |
| 98 | 98 | ** --latest acceptable in place of VERSION, update to latest version |
| 99 | 99 | ** --force-missing force update if missing content after sync |
| 100 | +** --no-symlinks Disables support for symlinks, overriding | |
| 101 | +** the "allow-symlinks" option. | |
| 100 | 102 | ** -n|--dry-run If given, display instead of run actions |
| 101 | 103 | ** -v|--verbose print status information about all files |
| 102 | 104 | ** -W|--width <num> Width of lines (default is to auto-detect). Must be >20 |
| 103 | 105 | ** or 0 (= no limit, resulting in a single line per entry). |
| 104 | 106 | ** |
| 105 | 107 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -95,10 +95,12 @@ | |
| 95 | ** Options: |
| 96 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 97 | ** --debug print debug information on stdout |
| 98 | ** --latest acceptable in place of VERSION, update to latest version |
| 99 | ** --force-missing force update if missing content after sync |
| 100 | ** -n|--dry-run If given, display instead of run actions |
| 101 | ** -v|--verbose print status information about all files |
| 102 | ** -W|--width <num> Width of lines (default is to auto-detect). Must be >20 |
| 103 | ** or 0 (= no limit, resulting in a single line per entry). |
| 104 | ** |
| 105 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -95,10 +95,12 @@ | |
| 95 | ** Options: |
| 96 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 97 | ** --debug print debug information on stdout |
| 98 | ** --latest acceptable in place of VERSION, update to latest version |
| 99 | ** --force-missing force update if missing content after sync |
| 100 | ** --no-symlinks Disables support for symlinks, overriding |
| 101 | ** the "allow-symlinks" option. |
| 102 | ** -n|--dry-run If given, display instead of run actions |
| 103 | ** -v|--verbose print status information about all files |
| 104 | ** -W|--width <num> Width of lines (default is to auto-detect). Must be >20 |
| 105 | ** or 0 (= no limit, resulting in a single line per entry). |
| 106 | ** |
| 107 |
+4
| --- www/env-opts.md | ||
| +++ www/env-opts.md | ||
| @@ -72,10 +72,14 @@ | ||
| 72 | 72 | `--localtime`: Override the `timeline-utc` option to explicitly use |
| 73 | 73 | local time. |
| 74 | 74 | |
| 75 | 75 | `--nocgi`: Prevent fossil from acting as a CGI by default even if the |
| 76 | 76 | `GATEWAY_INTERFACE` environment variable is set. |
| 77 | + | |
| 78 | +`--no-symlinks`: Override the `allow-symlinks` option, which normally | |
| 79 | +controls support for symlinks on Unix. When present, all support for | |
| 80 | +symlinks will be disabled. | |
| 77 | 81 | |
| 78 | 82 | `--no-th-hook`: (Sets `g.fNoThHook`.) Override the `th1-hooks` setting |
| 79 | 83 | and prevent any TH1 hooks from being executed. |
| 80 | 84 | |
| 81 | 85 | `--quiet`: (Sets `g.fQuiet`.) Cause fossil to suppress various messages and progress |
| 82 | 86 |
| --- www/env-opts.md | |
| +++ www/env-opts.md | |
| @@ -72,10 +72,14 @@ | |
| 72 | `--localtime`: Override the `timeline-utc` option to explicitly use |
| 73 | local time. |
| 74 | |
| 75 | `--nocgi`: Prevent fossil from acting as a CGI by default even if the |
| 76 | `GATEWAY_INTERFACE` environment variable is set. |
| 77 | |
| 78 | `--no-th-hook`: (Sets `g.fNoThHook`.) Override the `th1-hooks` setting |
| 79 | and prevent any TH1 hooks from being executed. |
| 80 | |
| 81 | `--quiet`: (Sets `g.fQuiet`.) Cause fossil to suppress various messages and progress |
| 82 |
| --- www/env-opts.md | |
| +++ www/env-opts.md | |
| @@ -72,10 +72,14 @@ | |
| 72 | `--localtime`: Override the `timeline-utc` option to explicitly use |
| 73 | local time. |
| 74 | |
| 75 | `--nocgi`: Prevent fossil from acting as a CGI by default even if the |
| 76 | `GATEWAY_INTERFACE` environment variable is set. |
| 77 | |
| 78 | `--no-symlinks`: Override the `allow-symlinks` option, which normally |
| 79 | controls support for symlinks on Unix. When present, all support for |
| 80 | symlinks will be disabled. |
| 81 | |
| 82 | `--no-th-hook`: (Sets `g.fNoThHook`.) Override the `th1-hooks` setting |
| 83 | and prevent any TH1 hooks from being executed. |
| 84 | |
| 85 | `--quiet`: (Sets `g.fQuiet`.) Cause fossil to suppress various messages and progress |
| 86 |