Fossil SCM
Remove unused final argument to locate_unmanaged_files()
Commit
c2b3f6b1c01ac3ca0666ca07de1122d932603318
Parent
31c6140e7517403…
1 file changed
+6
-7
+6
-7
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -64,12 +64,11 @@ | ||
| 64 | 64 | */ |
| 65 | 65 | static void locate_unmanaged_files( |
| 66 | 66 | int argc, /* Number of command-line arguments to examine */ |
| 67 | 67 | char **argv, /* values of command-line arguments */ |
| 68 | 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 */ | |
| 69 | + Glob *pIgnore /* Do not add files that match this GLOB */ | |
| 71 | 70 | ){ |
| 72 | 71 | Blob name; /* Name of a candidate file or directory */ |
| 73 | 72 | char *zName; /* Name of a candidate file or directory */ |
| 74 | 73 | int isDir; /* 1 for a directory, 0 if doesn't exist, 2 for anything else */ |
| 75 | 74 | int i; /* Loop counter */ |
| @@ -78,19 +77,19 @@ | ||
| 78 | 77 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 79 | 78 | filename_collation()); |
| 80 | 79 | nRoot = (int)strlen(g.zLocalRoot); |
| 81 | 80 | if( argc==0 ){ |
| 82 | 81 | 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); | |
| 84 | 83 | blob_reset(&name); |
| 85 | 84 | }else{ |
| 86 | 85 | for(i=0; i<argc; i++){ |
| 87 | 86 | file_canonical_name(argv[i], &name, 0); |
| 88 | 87 | zName = blob_str(&name); |
| 89 | 88 | isDir = file_wd_isdir(zName); |
| 90 | 89 | if( isDir==1 ){ |
| 91 | - vfile_scan(&name, nRoot-1, scanFlags, pIgnore1, pIgnore2); | |
| 90 | + vfile_scan(&name, nRoot-1, scanFlags, pIgnore, 0); | |
| 92 | 91 | }else if( isDir==0 ){ |
| 93 | 92 | fossil_warning("not found: %s", &zName[nRoot]); |
| 94 | 93 | }else if( file_access(zName, R_OK) ){ |
| 95 | 94 | fossil_fatal("cannot open %s", &zName[nRoot]); |
| 96 | 95 | }else{ |
| @@ -482,11 +481,11 @@ | ||
| 482 | 481 | vfile_check_signature(vid, useSha1sum ? CKSIG_SHA1 : 0); |
| 483 | 482 | |
| 484 | 483 | /* Search for unmanaged files if requested. Exclude reserved files. */ |
| 485 | 484 | if( flags & C_EXTRA ){ |
| 486 | 485 | 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); | |
| 488 | 487 | glob_free(pIgnore); |
| 489 | 488 | db_multi_exec("DELETE FROM sfile WHERE x IN (%s)", |
| 490 | 489 | fossil_all_reserved_names(0)); |
| 491 | 490 | } |
| 492 | 491 | |
| @@ -791,11 +790,11 @@ | ||
| 791 | 790 | |
| 792 | 791 | if( zIgnoreFlag==0 ){ |
| 793 | 792 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 794 | 793 | } |
| 795 | 794 | 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); | |
| 797 | 796 | glob_free(pIgnore); |
| 798 | 797 | db_prepare(&q, |
| 799 | 798 | "SELECT x FROM sfile" |
| 800 | 799 | " WHERE x NOT IN (%s)" |
| 801 | 800 | " ORDER BY 1", |
| @@ -971,11 +970,11 @@ | ||
| 971 | 970 | g.allowSymlinks = 1; /* Find symlinks too */ |
| 972 | 971 | if( !dirsOnlyFlag ){ |
| 973 | 972 | Stmt q; |
| 974 | 973 | Blob repo; |
| 975 | 974 | 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); | |
| 977 | 976 | db_prepare(&q, |
| 978 | 977 | "SELECT %Q || x FROM sfile" |
| 979 | 978 | " WHERE x NOT IN (%s)" |
| 980 | 979 | " ORDER BY 1", |
| 981 | 980 | g.zLocalRoot, fossil_all_reserved_names(0) |
| 982 | 981 |
| --- 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 |