Fossil SCM

Remove unused final argument to locate_unmanaged_files()

andygoth 2016-11-06 03:16 UTC andygoth-changes
Commit c2b3f6b1c01ac3ca0666ca07de1122d932603318
1 file changed +6 -7
+6 -7
--- src/checkin.c
+++ src/checkin.c
@@ -64,12 +64,11 @@
6464
*/
6565
static void locate_unmanaged_files(
6666
int argc, /* Number of command-line arguments to examine */
6767
char **argv, /* values of command-line arguments */
6868
unsigned scanFlags, /* Zero or more SCAN_xxx flags */
69
- Glob *pIgnore1, /* Do not add files that match this GLOB */
70
- Glob *pIgnore2 /* Omit files matching this GLOB too */
69
+ Glob *pIgnore /* Do not add files that match this GLOB */
7170
){
7271
Blob name; /* Name of a candidate file or directory */
7372
char *zName; /* Name of a candidate file or directory */
7473
int isDir; /* 1 for a directory, 0 if doesn't exist, 2 for anything else */
7574
int i; /* Loop counter */
@@ -78,19 +77,19 @@
7877
db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
7978
filename_collation());
8079
nRoot = (int)strlen(g.zLocalRoot);
8180
if( argc==0 ){
8281
blob_init(&name, g.zLocalRoot, nRoot - 1);
83
- vfile_scan(&name, blob_size(&name), scanFlags, pIgnore1, pIgnore2);
82
+ vfile_scan(&name, blob_size(&name), scanFlags, pIgnore, 0);
8483
blob_reset(&name);
8584
}else{
8685
for(i=0; i<argc; i++){
8786
file_canonical_name(argv[i], &name, 0);
8887
zName = blob_str(&name);
8988
isDir = file_wd_isdir(zName);
9089
if( isDir==1 ){
91
- vfile_scan(&name, nRoot-1, scanFlags, pIgnore1, pIgnore2);
90
+ vfile_scan(&name, nRoot-1, scanFlags, pIgnore, 0);
9291
}else if( isDir==0 ){
9392
fossil_warning("not found: %s", &zName[nRoot]);
9493
}else if( file_access(zName, R_OK) ){
9594
fossil_fatal("cannot open %s", &zName[nRoot]);
9695
}else{
@@ -482,11 +481,11 @@
482481
vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0);
483482
484483
/* Search for unmanaged files if requested. Exclude reserved files. */
485484
if( flags & C_EXTRA ){
486485
Glob *pIgnore = glob_create(zIgnoreFlag);
487
- locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
486
+ locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore);
488487
glob_free(pIgnore);
489488
db_multi_exec("DELETE FROM sfile WHERE x IN (%s)",
490489
fossil_all_reserved_names(0));
491490
}
492491
@@ -791,11 +790,11 @@
791790
792791
if( zIgnoreFlag==0 ){
793792
zIgnoreFlag = db_get("ignore-glob", 0);
794793
}
795794
pIgnore = glob_create(zIgnoreFlag);
796
- locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
795
+ locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore);
797796
glob_free(pIgnore);
798797
db_prepare(&q,
799798
"SELECT x FROM sfile"
800799
" WHERE x NOT IN (%s)"
801800
" ORDER BY 1",
@@ -971,11 +970,11 @@
971970
g.allowSymlinks = 1; /* Find symlinks too */
972971
if( !dirsOnlyFlag ){
973972
Stmt q;
974973
Blob repo;
975974
if( !dryRunFlag && !disableUndo ) undo_begin();
976
- locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
975
+ locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore);
977976
db_prepare(&q,
978977
"SELECT %Q || x FROM sfile"
979978
" WHERE x NOT IN (%s)"
980979
" ORDER BY 1",
981980
g.zLocalRoot, fossil_all_reserved_names(0)
982981
--- src/checkin.c
+++ src/checkin.c
@@ -64,12 +64,11 @@
64 */
65 static void locate_unmanaged_files(
66 int argc, /* Number of command-line arguments to examine */
67 char **argv, /* values of command-line arguments */
68 unsigned scanFlags, /* Zero or more SCAN_xxx flags */
69 Glob *pIgnore1, /* Do not add files that match this GLOB */
70 Glob *pIgnore2 /* Omit files matching this GLOB too */
71 ){
72 Blob name; /* Name of a candidate file or directory */
73 char *zName; /* Name of a candidate file or directory */
74 int isDir; /* 1 for a directory, 0 if doesn't exist, 2 for anything else */
75 int i; /* Loop counter */
@@ -78,19 +77,19 @@
78 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
79 filename_collation());
80 nRoot = (int)strlen(g.zLocalRoot);
81 if( argc==0 ){
82 blob_init(&name, g.zLocalRoot, nRoot - 1);
83 vfile_scan(&name, blob_size(&name), scanFlags, pIgnore1, pIgnore2);
84 blob_reset(&name);
85 }else{
86 for(i=0; i<argc; i++){
87 file_canonical_name(argv[i], &name, 0);
88 zName = blob_str(&name);
89 isDir = file_wd_isdir(zName);
90 if( isDir==1 ){
91 vfile_scan(&name, nRoot-1, scanFlags, pIgnore1, pIgnore2);
92 }else if( isDir==0 ){
93 fossil_warning("not found: %s", &zName[nRoot]);
94 }else if( file_access(zName, R_OK) ){
95 fossil_fatal("cannot open %s", &zName[nRoot]);
96 }else{
@@ -482,11 +481,11 @@
482 vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0);
483
484 /* Search for unmanaged files if requested. Exclude reserved files. */
485 if( flags & C_EXTRA ){
486 Glob *pIgnore = glob_create(zIgnoreFlag);
487 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
488 glob_free(pIgnore);
489 db_multi_exec("DELETE FROM sfile WHERE x IN (%s)",
490 fossil_all_reserved_names(0));
491 }
492
@@ -791,11 +790,11 @@
791
792 if( zIgnoreFlag==0 ){
793 zIgnoreFlag = db_get("ignore-glob", 0);
794 }
795 pIgnore = glob_create(zIgnoreFlag);
796 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
797 glob_free(pIgnore);
798 db_prepare(&q,
799 "SELECT x FROM sfile"
800 " WHERE x NOT IN (%s)"
801 " ORDER BY 1",
@@ -971,11 +970,11 @@
971 g.allowSymlinks = 1; /* Find symlinks too */
972 if( !dirsOnlyFlag ){
973 Stmt q;
974 Blob repo;
975 if( !dryRunFlag && !disableUndo ) undo_begin();
976 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore, 0);
977 db_prepare(&q,
978 "SELECT %Q || x FROM sfile"
979 " WHERE x NOT IN (%s)"
980 " ORDER BY 1",
981 g.zLocalRoot, fossil_all_reserved_names(0)
982
--- src/checkin.c
+++ src/checkin.c
@@ -64,12 +64,11 @@
64 */
65 static void locate_unmanaged_files(
66 int argc, /* Number of command-line arguments to examine */
67 char **argv, /* values of command-line arguments */
68 unsigned scanFlags, /* Zero or more SCAN_xxx flags */
69 Glob *pIgnore /* Do not add files that match this GLOB */
 
70 ){
71 Blob name; /* Name of a candidate file or directory */
72 char *zName; /* Name of a candidate file or directory */
73 int isDir; /* 1 for a directory, 0 if doesn't exist, 2 for anything else */
74 int i; /* Loop counter */
@@ -78,19 +77,19 @@
77 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
78 filename_collation());
79 nRoot = (int)strlen(g.zLocalRoot);
80 if( argc==0 ){
81 blob_init(&name, g.zLocalRoot, nRoot - 1);
82 vfile_scan(&name, blob_size(&name), scanFlags, pIgnore, 0);
83 blob_reset(&name);
84 }else{
85 for(i=0; i<argc; i++){
86 file_canonical_name(argv[i], &name, 0);
87 zName = blob_str(&name);
88 isDir = file_wd_isdir(zName);
89 if( isDir==1 ){
90 vfile_scan(&name, nRoot-1, scanFlags, pIgnore, 0);
91 }else if( isDir==0 ){
92 fossil_warning("not found: %s", &zName[nRoot]);
93 }else if( file_access(zName, R_OK) ){
94 fossil_fatal("cannot open %s", &zName[nRoot]);
95 }else{
@@ -482,11 +481,11 @@
481 vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0);
482
483 /* Search for unmanaged files if requested. Exclude reserved files. */
484 if( flags & C_EXTRA ){
485 Glob *pIgnore = glob_create(zIgnoreFlag);
486 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore);
487 glob_free(pIgnore);
488 db_multi_exec("DELETE FROM sfile WHERE x IN (%s)",
489 fossil_all_reserved_names(0));
490 }
491
@@ -791,11 +790,11 @@
790
791 if( zIgnoreFlag==0 ){
792 zIgnoreFlag = db_get("ignore-glob", 0);
793 }
794 pIgnore = glob_create(zIgnoreFlag);
795 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore);
796 glob_free(pIgnore);
797 db_prepare(&q,
798 "SELECT x FROM sfile"
799 " WHERE x NOT IN (%s)"
800 " ORDER BY 1",
@@ -971,11 +970,11 @@
970 g.allowSymlinks = 1; /* Find symlinks too */
971 if( !dirsOnlyFlag ){
972 Stmt q;
973 Blob repo;
974 if( !dryRunFlag && !disableUndo ) undo_begin();
975 locate_unmanaged_files(g.argc-2, g.argv+2, scanFlags, pIgnore);
976 db_prepare(&q,
977 "SELECT %Q || x FROM sfile"
978 " WHERE x NOT IN (%s)"
979 " ORDER BY 1",
980 g.zLocalRoot, fossil_all_reserved_names(0)
981

Keyboard Shortcuts

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