Fossil SCM

Imply the --emptydirs option automatically when the --dirsonly option is used.

mistachkin 2013-09-30 13:45 UTC cleanEmptyDirs
Commit 0ecb9500028e7ce665e87125bd715e1d0c4d690f
1 file changed +3 -2
+3 -2
--- src/checkin.c
+++ src/checkin.c
@@ -515,11 +515,12 @@
515515
** empty-dirs setting (and other applicable settings)
516516
** belonging to the other repositories, if any, will
517517
** not be checked.
518518
** --case-sensitive <BOOL> override case-sensitive setting
519519
** --dirsonly Only remove empty directories. No files will
520
-** be removed.
520
+** be removed. Using this option will automatically
521
+** enable the --emptydirs option as well.
521522
** --dotfiles Include files beginning with a dot (".").
522523
** --emptydirs Remove any empty directories that are not
523524
** explicitly exempted via the empty-dirs setting
524525
** or another applicable setting or command line
525526
** argument. Matching files, if any, are removed
@@ -550,12 +551,12 @@
550551
dryRunFlag = find_option("dry-run","n",0)!=0;
551552
if( !dryRunFlag ){
552553
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
553554
}
554555
allFileFlag = allDirFlag = find_option("force","f",0)!=0;
555
- emptyDirsFlag = find_option("emptydirs","d",0)!=0;
556556
dirsOnlyFlag = find_option("dirsonly",0,0)!=0;
557
+ emptyDirsFlag = dirsOnlyFlag || find_option("emptydirs","d",0)!=0;
557558
if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
558559
if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
559560
if( find_option("allckouts",0,0)!=0 ) scanFlags |= SCAN_NESTED;
560561
zIgnoreFlag = find_option("ignore",0,1);
561562
verboseFlag = find_option("verbose","v",0)!=0;
562563
--- src/checkin.c
+++ src/checkin.c
@@ -515,11 +515,12 @@
515 ** empty-dirs setting (and other applicable settings)
516 ** belonging to the other repositories, if any, will
517 ** not be checked.
518 ** --case-sensitive <BOOL> override case-sensitive setting
519 ** --dirsonly Only remove empty directories. No files will
520 ** be removed.
 
521 ** --dotfiles Include files beginning with a dot (".").
522 ** --emptydirs Remove any empty directories that are not
523 ** explicitly exempted via the empty-dirs setting
524 ** or another applicable setting or command line
525 ** argument. Matching files, if any, are removed
@@ -550,12 +551,12 @@
550 dryRunFlag = find_option("dry-run","n",0)!=0;
551 if( !dryRunFlag ){
552 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
553 }
554 allFileFlag = allDirFlag = find_option("force","f",0)!=0;
555 emptyDirsFlag = find_option("emptydirs","d",0)!=0;
556 dirsOnlyFlag = find_option("dirsonly",0,0)!=0;
 
557 if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
558 if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
559 if( find_option("allckouts",0,0)!=0 ) scanFlags |= SCAN_NESTED;
560 zIgnoreFlag = find_option("ignore",0,1);
561 verboseFlag = find_option("verbose","v",0)!=0;
562
--- src/checkin.c
+++ src/checkin.c
@@ -515,11 +515,12 @@
515 ** empty-dirs setting (and other applicable settings)
516 ** belonging to the other repositories, if any, will
517 ** not be checked.
518 ** --case-sensitive <BOOL> override case-sensitive setting
519 ** --dirsonly Only remove empty directories. No files will
520 ** be removed. Using this option will automatically
521 ** enable the --emptydirs option as well.
522 ** --dotfiles Include files beginning with a dot (".").
523 ** --emptydirs Remove any empty directories that are not
524 ** explicitly exempted via the empty-dirs setting
525 ** or another applicable setting or command line
526 ** argument. Matching files, if any, are removed
@@ -550,12 +551,12 @@
551 dryRunFlag = find_option("dry-run","n",0)!=0;
552 if( !dryRunFlag ){
553 dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
554 }
555 allFileFlag = allDirFlag = find_option("force","f",0)!=0;
 
556 dirsOnlyFlag = find_option("dirsonly",0,0)!=0;
557 emptyDirsFlag = dirsOnlyFlag || find_option("emptydirs","d",0)!=0;
558 if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL;
559 if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP;
560 if( find_option("allckouts",0,0)!=0 ) scanFlags |= SCAN_NESTED;
561 zIgnoreFlag = find_option("ignore",0,1);
562 verboseFlag = find_option("verbose","v",0)!=0;
563

Keyboard Shortcuts

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