Fossil SCM
Cleaning files matching ignore-glob should never be undoable. Other files being clean are undoable, even when using -x|--verily. That's how it should behave (I think)
Commit
b3384326b3a3b52aa273dea71269db39cfcc5f60
Parent
134d8e1189d3965…
1 file changed
+4
-3
+4
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -671,12 +671,13 @@ | ||
| 671 | 671 | ** therefore, directories that contain only files |
| 672 | 672 | ** that were removed will be removed as well. |
| 673 | 673 | ** -f|--force Remove files without prompting. |
| 674 | 674 | ** -x|--verily Remove everything that is not a managed file or |
| 675 | 675 | ** the repository itself. Implies -f --emptydirs |
| 676 | -** --dotfiles. Disregard keep-glob and ignore-glob. | |
| 677 | -** The clean will be faster but not undo-able any more. | |
| 676 | +** --dotfiles. Disregard keep-glob and ignore-glob, | |
| 677 | +** except that files matching ignore-glob are not | |
| 678 | +** never undo-able. | |
| 678 | 679 | ** --clean <CSG> Never prompt for files matching this |
| 679 | 680 | ** comma separated list of glob patterns. |
| 680 | 681 | ** --ignore <CSG> Ignore files matching patterns from the |
| 681 | 682 | ** comma separated list of glob patterns. |
| 682 | 683 | ** --keep <CSG> Keep files matching this comma separated |
| @@ -779,11 +780,11 @@ | ||
| 779 | 780 | blob_reset(&ans); |
| 780 | 781 | continue; |
| 781 | 782 | } |
| 782 | 783 | blob_reset(&ans); |
| 783 | 784 | } |
| 784 | - if( !dryRunFlag && !verilyFlag && !glob_match(pIgnore, zName+nRoot) | |
| 785 | + if( !dryRunFlag && !(verilyFlag && glob_match(pIgnore, zName+nRoot)) | |
| 785 | 786 | && undo_save(zName+nRoot, 10*1024*1024) ){ |
| 786 | 787 | prompt = mprintf("file \"%s\" too big. Deletion will not be " |
| 787 | 788 | "undo-able. Continue (y/N)? ", zName+nRoot); |
| 788 | 789 | blob_zero(&ans); |
| 789 | 790 | prompt_user(prompt, &ans); |
| 790 | 791 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -671,12 +671,13 @@ | |
| 671 | ** therefore, directories that contain only files |
| 672 | ** that were removed will be removed as well. |
| 673 | ** -f|--force Remove files without prompting. |
| 674 | ** -x|--verily Remove everything that is not a managed file or |
| 675 | ** the repository itself. Implies -f --emptydirs |
| 676 | ** --dotfiles. Disregard keep-glob and ignore-glob. |
| 677 | ** The clean will be faster but not undo-able any more. |
| 678 | ** --clean <CSG> Never prompt for files matching this |
| 679 | ** comma separated list of glob patterns. |
| 680 | ** --ignore <CSG> Ignore files matching patterns from the |
| 681 | ** comma separated list of glob patterns. |
| 682 | ** --keep <CSG> Keep files matching this comma separated |
| @@ -779,11 +780,11 @@ | |
| 779 | blob_reset(&ans); |
| 780 | continue; |
| 781 | } |
| 782 | blob_reset(&ans); |
| 783 | } |
| 784 | if( !dryRunFlag && !verilyFlag && !glob_match(pIgnore, zName+nRoot) |
| 785 | && undo_save(zName+nRoot, 10*1024*1024) ){ |
| 786 | prompt = mprintf("file \"%s\" too big. Deletion will not be " |
| 787 | "undo-able. Continue (y/N)? ", zName+nRoot); |
| 788 | blob_zero(&ans); |
| 789 | prompt_user(prompt, &ans); |
| 790 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -671,12 +671,13 @@ | |
| 671 | ** therefore, directories that contain only files |
| 672 | ** that were removed will be removed as well. |
| 673 | ** -f|--force Remove files without prompting. |
| 674 | ** -x|--verily Remove everything that is not a managed file or |
| 675 | ** the repository itself. Implies -f --emptydirs |
| 676 | ** --dotfiles. Disregard keep-glob and ignore-glob, |
| 677 | ** except that files matching ignore-glob are not |
| 678 | ** never undo-able. |
| 679 | ** --clean <CSG> Never prompt for files matching this |
| 680 | ** comma separated list of glob patterns. |
| 681 | ** --ignore <CSG> Ignore files matching patterns from the |
| 682 | ** comma separated list of glob patterns. |
| 683 | ** --keep <CSG> Keep files matching this comma separated |
| @@ -779,11 +780,11 @@ | |
| 780 | blob_reset(&ans); |
| 781 | continue; |
| 782 | } |
| 783 | blob_reset(&ans); |
| 784 | } |
| 785 | if( !dryRunFlag && !(verilyFlag && glob_match(pIgnore, zName+nRoot)) |
| 786 | && undo_save(zName+nRoot, 10*1024*1024) ){ |
| 787 | prompt = mprintf("file \"%s\" too big. Deletion will not be " |
| 788 | "undo-able. Continue (y/N)? ", zName+nRoot); |
| 789 | blob_zero(&ans); |
| 790 | prompt_user(prompt, &ans); |
| 791 |