Fossil SCM
Fix [85017e9273]: Under Windows, renamed file keeps getting "ADDED".
Commit
e8e444eceb2628b2caf8443a443b3be827ed7bde
Parent
9359b41fd5fcdbc…
5 files changed
+2
-2
+2
-2
+10
-2
+5
-3
+5
-3
+2
-2
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -287,11 +287,11 @@ | ||
| 287 | 287 | |
| 288 | 288 | file_canonical_name(g.argv[i], &fullName, 0); |
| 289 | 289 | zName = blob_str(&fullName); |
| 290 | 290 | isDir = file_wd_isdir(zName); |
| 291 | 291 | if( isDir==1 ){ |
| 292 | - vfile_scan(&fullName, nRoot-1, scanFlags, pIgnore); | |
| 292 | + vfile_scan(&fullName, nRoot-1, scanFlags, pIgnore, caseSensitive); | |
| 293 | 293 | }else if( isDir==0 ){ |
| 294 | 294 | fossil_warning("not found: %s", zName); |
| 295 | 295 | }else if( file_access(zName, R_OK) ){ |
| 296 | 296 | fossil_fatal("cannot open %s", zName); |
| 297 | 297 | }else{ |
| @@ -516,11 +516,11 @@ | ||
| 516 | 516 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)"); |
| 517 | 517 | n = strlen(g.zLocalRoot); |
| 518 | 518 | blob_init(&path, g.zLocalRoot, n-1); |
| 519 | 519 | /* now we read the complete file structure into a temp table */ |
| 520 | 520 | pIgnore = glob_create(zIgnoreFlag); |
| 521 | - vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); | |
| 521 | + vfile_scan(&path, blob_size(&path), scanFlags, pIgnore, caseSensitive); | |
| 522 | 522 | glob_free(pIgnore); |
| 523 | 523 | nAdd = add_files_in_sfile(vid, caseSensitive); |
| 524 | 524 | |
| 525 | 525 | /* step 2: search for missing files */ |
| 526 | 526 | db_prepare(&q, |
| 527 | 527 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -287,11 +287,11 @@ | |
| 287 | |
| 288 | file_canonical_name(g.argv[i], &fullName, 0); |
| 289 | zName = blob_str(&fullName); |
| 290 | isDir = file_wd_isdir(zName); |
| 291 | if( isDir==1 ){ |
| 292 | vfile_scan(&fullName, nRoot-1, scanFlags, pIgnore); |
| 293 | }else if( isDir==0 ){ |
| 294 | fossil_warning("not found: %s", zName); |
| 295 | }else if( file_access(zName, R_OK) ){ |
| 296 | fossil_fatal("cannot open %s", zName); |
| 297 | }else{ |
| @@ -516,11 +516,11 @@ | |
| 516 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)"); |
| 517 | n = strlen(g.zLocalRoot); |
| 518 | blob_init(&path, g.zLocalRoot, n-1); |
| 519 | /* now we read the complete file structure into a temp table */ |
| 520 | pIgnore = glob_create(zIgnoreFlag); |
| 521 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); |
| 522 | glob_free(pIgnore); |
| 523 | nAdd = add_files_in_sfile(vid, caseSensitive); |
| 524 | |
| 525 | /* step 2: search for missing files */ |
| 526 | db_prepare(&q, |
| 527 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -287,11 +287,11 @@ | |
| 287 | |
| 288 | file_canonical_name(g.argv[i], &fullName, 0); |
| 289 | zName = blob_str(&fullName); |
| 290 | isDir = file_wd_isdir(zName); |
| 291 | if( isDir==1 ){ |
| 292 | vfile_scan(&fullName, nRoot-1, scanFlags, pIgnore, caseSensitive); |
| 293 | }else if( isDir==0 ){ |
| 294 | fossil_warning("not found: %s", zName); |
| 295 | }else if( file_access(zName, R_OK) ){ |
| 296 | fossil_fatal("cannot open %s", zName); |
| 297 | }else{ |
| @@ -516,11 +516,11 @@ | |
| 516 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)"); |
| 517 | n = strlen(g.zLocalRoot); |
| 518 | blob_init(&path, g.zLocalRoot, n-1); |
| 519 | /* now we read the complete file structure into a temp table */ |
| 520 | pIgnore = glob_create(zIgnoreFlag); |
| 521 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore, caseSensitive); |
| 522 | glob_free(pIgnore); |
| 523 | nAdd = add_files_in_sfile(vid, caseSensitive); |
| 524 | |
| 525 | /* step 2: search for missing files */ |
| 526 | db_prepare(&q, |
| 527 |
+2
-2
| --- src/add.c | ||
| +++ src/add.c | ||
| @@ -287,11 +287,11 @@ | ||
| 287 | 287 | |
| 288 | 288 | file_canonical_name(g.argv[i], &fullName, 0); |
| 289 | 289 | zName = blob_str(&fullName); |
| 290 | 290 | isDir = file_wd_isdir(zName); |
| 291 | 291 | if( isDir==1 ){ |
| 292 | - vfile_scan(&fullName, nRoot-1, scanFlags, pIgnore); | |
| 292 | + vfile_scan(&fullName, nRoot-1, scanFlags, pIgnore, caseSensitive); | |
| 293 | 293 | }else if( isDir==0 ){ |
| 294 | 294 | fossil_warning("not found: %s", zName); |
| 295 | 295 | }else if( file_access(zName, R_OK) ){ |
| 296 | 296 | fossil_fatal("cannot open %s", zName); |
| 297 | 297 | }else{ |
| @@ -516,11 +516,11 @@ | ||
| 516 | 516 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)"); |
| 517 | 517 | n = strlen(g.zLocalRoot); |
| 518 | 518 | blob_init(&path, g.zLocalRoot, n-1); |
| 519 | 519 | /* now we read the complete file structure into a temp table */ |
| 520 | 520 | pIgnore = glob_create(zIgnoreFlag); |
| 521 | - vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); | |
| 521 | + vfile_scan(&path, blob_size(&path), scanFlags, pIgnore, caseSensitive); | |
| 522 | 522 | glob_free(pIgnore); |
| 523 | 523 | nAdd = add_files_in_sfile(vid, caseSensitive); |
| 524 | 524 | |
| 525 | 525 | /* step 2: search for missing files */ |
| 526 | 526 | db_prepare(&q, |
| 527 | 527 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -287,11 +287,11 @@ | |
| 287 | |
| 288 | file_canonical_name(g.argv[i], &fullName, 0); |
| 289 | zName = blob_str(&fullName); |
| 290 | isDir = file_wd_isdir(zName); |
| 291 | if( isDir==1 ){ |
| 292 | vfile_scan(&fullName, nRoot-1, scanFlags, pIgnore); |
| 293 | }else if( isDir==0 ){ |
| 294 | fossil_warning("not found: %s", zName); |
| 295 | }else if( file_access(zName, R_OK) ){ |
| 296 | fossil_fatal("cannot open %s", zName); |
| 297 | }else{ |
| @@ -516,11 +516,11 @@ | |
| 516 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)"); |
| 517 | n = strlen(g.zLocalRoot); |
| 518 | blob_init(&path, g.zLocalRoot, n-1); |
| 519 | /* now we read the complete file structure into a temp table */ |
| 520 | pIgnore = glob_create(zIgnoreFlag); |
| 521 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); |
| 522 | glob_free(pIgnore); |
| 523 | nAdd = add_files_in_sfile(vid, caseSensitive); |
| 524 | |
| 525 | /* step 2: search for missing files */ |
| 526 | db_prepare(&q, |
| 527 |
| --- src/add.c | |
| +++ src/add.c | |
| @@ -287,11 +287,11 @@ | |
| 287 | |
| 288 | file_canonical_name(g.argv[i], &fullName, 0); |
| 289 | zName = blob_str(&fullName); |
| 290 | isDir = file_wd_isdir(zName); |
| 291 | if( isDir==1 ){ |
| 292 | vfile_scan(&fullName, nRoot-1, scanFlags, pIgnore, caseSensitive); |
| 293 | }else if( isDir==0 ){ |
| 294 | fossil_warning("not found: %s", zName); |
| 295 | }else if( file_access(zName, R_OK) ){ |
| 296 | fossil_fatal("cannot open %s", zName); |
| 297 | }else{ |
| @@ -516,11 +516,11 @@ | |
| 516 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)"); |
| 517 | n = strlen(g.zLocalRoot); |
| 518 | blob_init(&path, g.zLocalRoot, n-1); |
| 519 | /* now we read the complete file structure into a temp table */ |
| 520 | pIgnore = glob_create(zIgnoreFlag); |
| 521 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore, caseSensitive); |
| 522 | glob_free(pIgnore); |
| 523 | nAdd = add_files_in_sfile(vid, caseSensitive); |
| 524 | |
| 525 | /* step 2: search for missing files */ |
| 526 | db_prepare(&q, |
| 527 |
+10
-2
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -314,10 +314,11 @@ | ||
| 314 | 314 | ** Pathnames are displayed according to the "relative-paths" setting, |
| 315 | 315 | ** unless overridden by the --abs-paths or --rel-paths options. |
| 316 | 316 | ** |
| 317 | 317 | ** Options: |
| 318 | 318 | ** --abs-paths Display absolute pathnames. |
| 319 | +** --case-sensitive <BOOL> override case-sensitive setting | |
| 319 | 320 | ** --dotfiles include files beginning with a dot (".") |
| 320 | 321 | ** --ignore <CSG> ignore files matching patterns from the argument |
| 321 | 322 | ** --rel-paths Display pathnames relative to the current working |
| 322 | 323 | ** directory. |
| 323 | 324 | ** |
| @@ -331,23 +332,26 @@ | ||
| 331 | 332 | unsigned scanFlags = find_option("dotfiles",0,0)!=0 ? SCAN_ALL : 0; |
| 332 | 333 | int cwdRelative = 0; |
| 333 | 334 | Glob *pIgnore; |
| 334 | 335 | Blob rewrittenPathname; |
| 335 | 336 | const char *zPathname, *zDisplayName; |
| 337 | + int caseSensitive; | |
| 336 | 338 | |
| 337 | 339 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 340 | + capture_case_sensitive_option(); | |
| 338 | 341 | db_must_be_within_tree(); |
| 342 | + caseSensitive = filenames_are_case_sensitive(); | |
| 339 | 343 | cwdRelative = determine_cwd_relative_option(); |
| 340 | 344 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 341 | 345 | filename_collation()); |
| 342 | 346 | n = strlen(g.zLocalRoot); |
| 343 | 347 | blob_init(&path, g.zLocalRoot, n-1); |
| 344 | 348 | if( zIgnoreFlag==0 ){ |
| 345 | 349 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 346 | 350 | } |
| 347 | 351 | pIgnore = glob_create(zIgnoreFlag); |
| 348 | - vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); | |
| 352 | + vfile_scan(&path, blob_size(&path), scanFlags, pIgnore, caseSensitive); | |
| 349 | 353 | glob_free(pIgnore); |
| 350 | 354 | db_prepare(&q, |
| 351 | 355 | "SELECT x FROM sfile" |
| 352 | 356 | " WHERE x NOT IN (%s)" |
| 353 | 357 | " ORDER BY 1", |
| @@ -391,10 +395,11 @@ | ||
| 391 | 395 | ** The GLOBPATTERN is a comma-separated list of GLOB expressions for |
| 392 | 396 | ** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" |
| 393 | 397 | ** is used if the --ignore option is omitted. |
| 394 | 398 | ** |
| 395 | 399 | ** Options: |
| 400 | +** --case-sensitive <BOOL> override case-sensitive setting | |
| 396 | 401 | ** --dotfiles include files beginning with a dot (".") |
| 397 | 402 | ** --force Remove files without prompting |
| 398 | 403 | ** --ignore <CSG> ignore files matching patterns from the |
| 399 | 404 | ** comma separated list of glob patterns. |
| 400 | 405 | ** --temp Remove only Fossil-generated temporary files |
| @@ -408,26 +413,29 @@ | ||
| 408 | 413 | Blob path, repo; |
| 409 | 414 | Stmt q; |
| 410 | 415 | int n; |
| 411 | 416 | Glob *pIgnore; |
| 412 | 417 | int testFlag = 0; |
| 418 | + int caseSensitive; | |
| 413 | 419 | |
| 414 | 420 | allFlag = find_option("force","f",0)!=0; |
| 415 | 421 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 416 | 422 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 417 | 423 | zIgnoreFlag = find_option("ignore",0,1); |
| 418 | 424 | testFlag = find_option("test",0,0)!=0; |
| 425 | + capture_case_sensitive_option(); | |
| 419 | 426 | db_must_be_within_tree(); |
| 427 | + caseSensitive = filenames_are_case_sensitive(); | |
| 420 | 428 | if( zIgnoreFlag==0 ){ |
| 421 | 429 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 422 | 430 | } |
| 423 | 431 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 424 | 432 | filename_collation()); |
| 425 | 433 | n = strlen(g.zLocalRoot); |
| 426 | 434 | blob_init(&path, g.zLocalRoot, n-1); |
| 427 | 435 | pIgnore = glob_create(zIgnoreFlag); |
| 428 | - vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); | |
| 436 | + vfile_scan(&path, blob_size(&path), scanFlags, pIgnore, caseSensitive); | |
| 429 | 437 | glob_free(pIgnore); |
| 430 | 438 | db_prepare(&q, |
| 431 | 439 | "SELECT %Q || x FROM sfile" |
| 432 | 440 | " WHERE x NOT IN (%s)" |
| 433 | 441 | " ORDER BY 1", |
| 434 | 442 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -314,10 +314,11 @@ | |
| 314 | ** Pathnames are displayed according to the "relative-paths" setting, |
| 315 | ** unless overridden by the --abs-paths or --rel-paths options. |
| 316 | ** |
| 317 | ** Options: |
| 318 | ** --abs-paths Display absolute pathnames. |
| 319 | ** --dotfiles include files beginning with a dot (".") |
| 320 | ** --ignore <CSG> ignore files matching patterns from the argument |
| 321 | ** --rel-paths Display pathnames relative to the current working |
| 322 | ** directory. |
| 323 | ** |
| @@ -331,23 +332,26 @@ | |
| 331 | unsigned scanFlags = find_option("dotfiles",0,0)!=0 ? SCAN_ALL : 0; |
| 332 | int cwdRelative = 0; |
| 333 | Glob *pIgnore; |
| 334 | Blob rewrittenPathname; |
| 335 | const char *zPathname, *zDisplayName; |
| 336 | |
| 337 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 338 | db_must_be_within_tree(); |
| 339 | cwdRelative = determine_cwd_relative_option(); |
| 340 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 341 | filename_collation()); |
| 342 | n = strlen(g.zLocalRoot); |
| 343 | blob_init(&path, g.zLocalRoot, n-1); |
| 344 | if( zIgnoreFlag==0 ){ |
| 345 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 346 | } |
| 347 | pIgnore = glob_create(zIgnoreFlag); |
| 348 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); |
| 349 | glob_free(pIgnore); |
| 350 | db_prepare(&q, |
| 351 | "SELECT x FROM sfile" |
| 352 | " WHERE x NOT IN (%s)" |
| 353 | " ORDER BY 1", |
| @@ -391,10 +395,11 @@ | |
| 391 | ** The GLOBPATTERN is a comma-separated list of GLOB expressions for |
| 392 | ** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" |
| 393 | ** is used if the --ignore option is omitted. |
| 394 | ** |
| 395 | ** Options: |
| 396 | ** --dotfiles include files beginning with a dot (".") |
| 397 | ** --force Remove files without prompting |
| 398 | ** --ignore <CSG> ignore files matching patterns from the |
| 399 | ** comma separated list of glob patterns. |
| 400 | ** --temp Remove only Fossil-generated temporary files |
| @@ -408,26 +413,29 @@ | |
| 408 | Blob path, repo; |
| 409 | Stmt q; |
| 410 | int n; |
| 411 | Glob *pIgnore; |
| 412 | int testFlag = 0; |
| 413 | |
| 414 | allFlag = find_option("force","f",0)!=0; |
| 415 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 416 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 417 | zIgnoreFlag = find_option("ignore",0,1); |
| 418 | testFlag = find_option("test",0,0)!=0; |
| 419 | db_must_be_within_tree(); |
| 420 | if( zIgnoreFlag==0 ){ |
| 421 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 422 | } |
| 423 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 424 | filename_collation()); |
| 425 | n = strlen(g.zLocalRoot); |
| 426 | blob_init(&path, g.zLocalRoot, n-1); |
| 427 | pIgnore = glob_create(zIgnoreFlag); |
| 428 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore); |
| 429 | glob_free(pIgnore); |
| 430 | db_prepare(&q, |
| 431 | "SELECT %Q || x FROM sfile" |
| 432 | " WHERE x NOT IN (%s)" |
| 433 | " ORDER BY 1", |
| 434 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -314,10 +314,11 @@ | |
| 314 | ** Pathnames are displayed according to the "relative-paths" setting, |
| 315 | ** unless overridden by the --abs-paths or --rel-paths options. |
| 316 | ** |
| 317 | ** Options: |
| 318 | ** --abs-paths Display absolute pathnames. |
| 319 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 320 | ** --dotfiles include files beginning with a dot (".") |
| 321 | ** --ignore <CSG> ignore files matching patterns from the argument |
| 322 | ** --rel-paths Display pathnames relative to the current working |
| 323 | ** directory. |
| 324 | ** |
| @@ -331,23 +332,26 @@ | |
| 332 | unsigned scanFlags = find_option("dotfiles",0,0)!=0 ? SCAN_ALL : 0; |
| 333 | int cwdRelative = 0; |
| 334 | Glob *pIgnore; |
| 335 | Blob rewrittenPathname; |
| 336 | const char *zPathname, *zDisplayName; |
| 337 | int caseSensitive; |
| 338 | |
| 339 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 340 | capture_case_sensitive_option(); |
| 341 | db_must_be_within_tree(); |
| 342 | caseSensitive = filenames_are_case_sensitive(); |
| 343 | cwdRelative = determine_cwd_relative_option(); |
| 344 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 345 | filename_collation()); |
| 346 | n = strlen(g.zLocalRoot); |
| 347 | blob_init(&path, g.zLocalRoot, n-1); |
| 348 | if( zIgnoreFlag==0 ){ |
| 349 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 350 | } |
| 351 | pIgnore = glob_create(zIgnoreFlag); |
| 352 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore, caseSensitive); |
| 353 | glob_free(pIgnore); |
| 354 | db_prepare(&q, |
| 355 | "SELECT x FROM sfile" |
| 356 | " WHERE x NOT IN (%s)" |
| 357 | " ORDER BY 1", |
| @@ -391,10 +395,11 @@ | |
| 395 | ** The GLOBPATTERN is a comma-separated list of GLOB expressions for |
| 396 | ** files that are ignored. The GLOBPATTERN specified by the "ignore-glob" |
| 397 | ** is used if the --ignore option is omitted. |
| 398 | ** |
| 399 | ** Options: |
| 400 | ** --case-sensitive <BOOL> override case-sensitive setting |
| 401 | ** --dotfiles include files beginning with a dot (".") |
| 402 | ** --force Remove files without prompting |
| 403 | ** --ignore <CSG> ignore files matching patterns from the |
| 404 | ** comma separated list of glob patterns. |
| 405 | ** --temp Remove only Fossil-generated temporary files |
| @@ -408,26 +413,29 @@ | |
| 413 | Blob path, repo; |
| 414 | Stmt q; |
| 415 | int n; |
| 416 | Glob *pIgnore; |
| 417 | int testFlag = 0; |
| 418 | int caseSensitive; |
| 419 | |
| 420 | allFlag = find_option("force","f",0)!=0; |
| 421 | if( find_option("dotfiles",0,0)!=0 ) scanFlags |= SCAN_ALL; |
| 422 | if( find_option("temp",0,0)!=0 ) scanFlags |= SCAN_TEMP; |
| 423 | zIgnoreFlag = find_option("ignore",0,1); |
| 424 | testFlag = find_option("test",0,0)!=0; |
| 425 | capture_case_sensitive_option(); |
| 426 | db_must_be_within_tree(); |
| 427 | caseSensitive = filenames_are_case_sensitive(); |
| 428 | if( zIgnoreFlag==0 ){ |
| 429 | zIgnoreFlag = db_get("ignore-glob", 0); |
| 430 | } |
| 431 | db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)", |
| 432 | filename_collation()); |
| 433 | n = strlen(g.zLocalRoot); |
| 434 | blob_init(&path, g.zLocalRoot, n-1); |
| 435 | pIgnore = glob_create(zIgnoreFlag); |
| 436 | vfile_scan(&path, blob_size(&path), scanFlags, pIgnore, caseSensitive); |
| 437 | glob_free(pIgnore); |
| 438 | db_prepare(&q, |
| 439 | "SELECT %Q || x FROM sfile" |
| 440 | " WHERE x NOT IN (%s)" |
| 441 | " ORDER BY 1", |
| 442 |
+5
-3
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -432,11 +432,12 @@ | ||
| 432 | 432 | ** |
| 433 | 433 | ** Any files or directories that match the glob pattern pIgnore are |
| 434 | 434 | ** excluded from the scan. Name matching occurs after the first |
| 435 | 435 | ** nPrefix characters are elided from the filename. |
| 436 | 436 | */ |
| 437 | -void vfile_scan(Blob *pPath, int nPrefix, unsigned scanFlags, Glob *pIgnore){ | |
| 437 | +void vfile_scan(Blob *pPath, int nPrefix, unsigned scanFlags, Glob *pIgnore, | |
| 438 | + int caseSensitive){ | |
| 438 | 439 | DIR *d; |
| 439 | 440 | int origSize; |
| 440 | 441 | const char *zDir; |
| 441 | 442 | struct dirent *pEntry; |
| 442 | 443 | int skipAll = 0; |
| @@ -453,11 +454,12 @@ | ||
| 453 | 454 | if( skipAll ) return; |
| 454 | 455 | |
| 455 | 456 | if( depth==0 ){ |
| 456 | 457 | db_prepare(&ins, |
| 457 | 458 | "INSERT OR IGNORE INTO sfile(x) SELECT :file" |
| 458 | - " WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE pathname=:file)" | |
| 459 | + " WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE" | |
| 460 | + " pathname=:file %s)", caseSensitive ? "" : "COLLATE nocase" | |
| 459 | 461 | ); |
| 460 | 462 | } |
| 461 | 463 | depth++; |
| 462 | 464 | |
| 463 | 465 | zDir = blob_str(pPath); |
| @@ -477,11 +479,11 @@ | ||
| 477 | 479 | zPath = blob_str(pPath); |
| 478 | 480 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 479 | 481 | /* do nothing */ |
| 480 | 482 | }else if( file_wd_isdir(zPath)==1 ){ |
| 481 | 483 | if( !vfile_top_of_checkout(zPath) ){ |
| 482 | - vfile_scan(pPath, nPrefix, scanFlags, pIgnore); | |
| 484 | + vfile_scan(pPath, nPrefix, scanFlags, pIgnore, caseSensitive); | |
| 483 | 485 | } |
| 484 | 486 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 485 | 487 | if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ |
| 486 | 488 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | 489 | db_step(&ins); |
| 488 | 490 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -432,11 +432,12 @@ | |
| 432 | ** |
| 433 | ** Any files or directories that match the glob pattern pIgnore are |
| 434 | ** excluded from the scan. Name matching occurs after the first |
| 435 | ** nPrefix characters are elided from the filename. |
| 436 | */ |
| 437 | void vfile_scan(Blob *pPath, int nPrefix, unsigned scanFlags, Glob *pIgnore){ |
| 438 | DIR *d; |
| 439 | int origSize; |
| 440 | const char *zDir; |
| 441 | struct dirent *pEntry; |
| 442 | int skipAll = 0; |
| @@ -453,11 +454,12 @@ | |
| 453 | if( skipAll ) return; |
| 454 | |
| 455 | if( depth==0 ){ |
| 456 | db_prepare(&ins, |
| 457 | "INSERT OR IGNORE INTO sfile(x) SELECT :file" |
| 458 | " WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE pathname=:file)" |
| 459 | ); |
| 460 | } |
| 461 | depth++; |
| 462 | |
| 463 | zDir = blob_str(pPath); |
| @@ -477,11 +479,11 @@ | |
| 477 | zPath = blob_str(pPath); |
| 478 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 479 | /* do nothing */ |
| 480 | }else if( file_wd_isdir(zPath)==1 ){ |
| 481 | if( !vfile_top_of_checkout(zPath) ){ |
| 482 | vfile_scan(pPath, nPrefix, scanFlags, pIgnore); |
| 483 | } |
| 484 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 485 | if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ |
| 486 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | db_step(&ins); |
| 488 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -432,11 +432,12 @@ | |
| 432 | ** |
| 433 | ** Any files or directories that match the glob pattern pIgnore are |
| 434 | ** excluded from the scan. Name matching occurs after the first |
| 435 | ** nPrefix characters are elided from the filename. |
| 436 | */ |
| 437 | void vfile_scan(Blob *pPath, int nPrefix, unsigned scanFlags, Glob *pIgnore, |
| 438 | int caseSensitive){ |
| 439 | DIR *d; |
| 440 | int origSize; |
| 441 | const char *zDir; |
| 442 | struct dirent *pEntry; |
| 443 | int skipAll = 0; |
| @@ -453,11 +454,12 @@ | |
| 454 | if( skipAll ) return; |
| 455 | |
| 456 | if( depth==0 ){ |
| 457 | db_prepare(&ins, |
| 458 | "INSERT OR IGNORE INTO sfile(x) SELECT :file" |
| 459 | " WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE" |
| 460 | " pathname=:file %s)", caseSensitive ? "" : "COLLATE nocase" |
| 461 | ); |
| 462 | } |
| 463 | depth++; |
| 464 | |
| 465 | zDir = blob_str(pPath); |
| @@ -477,11 +479,11 @@ | |
| 479 | zPath = blob_str(pPath); |
| 480 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 481 | /* do nothing */ |
| 482 | }else if( file_wd_isdir(zPath)==1 ){ |
| 483 | if( !vfile_top_of_checkout(zPath) ){ |
| 484 | vfile_scan(pPath, nPrefix, scanFlags, pIgnore, caseSensitive); |
| 485 | } |
| 486 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 487 | if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ |
| 488 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 489 | db_step(&ins); |
| 490 |
+5
-3
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -432,11 +432,12 @@ | ||
| 432 | 432 | ** |
| 433 | 433 | ** Any files or directories that match the glob pattern pIgnore are |
| 434 | 434 | ** excluded from the scan. Name matching occurs after the first |
| 435 | 435 | ** nPrefix characters are elided from the filename. |
| 436 | 436 | */ |
| 437 | -void vfile_scan(Blob *pPath, int nPrefix, unsigned scanFlags, Glob *pIgnore){ | |
| 437 | +void vfile_scan(Blob *pPath, int nPrefix, unsigned scanFlags, Glob *pIgnore, | |
| 438 | + int caseSensitive){ | |
| 438 | 439 | DIR *d; |
| 439 | 440 | int origSize; |
| 440 | 441 | const char *zDir; |
| 441 | 442 | struct dirent *pEntry; |
| 442 | 443 | int skipAll = 0; |
| @@ -453,11 +454,12 @@ | ||
| 453 | 454 | if( skipAll ) return; |
| 454 | 455 | |
| 455 | 456 | if( depth==0 ){ |
| 456 | 457 | db_prepare(&ins, |
| 457 | 458 | "INSERT OR IGNORE INTO sfile(x) SELECT :file" |
| 458 | - " WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE pathname=:file)" | |
| 459 | + " WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE" | |
| 460 | + " pathname=:file %s)", caseSensitive ? "" : "COLLATE nocase" | |
| 459 | 461 | ); |
| 460 | 462 | } |
| 461 | 463 | depth++; |
| 462 | 464 | |
| 463 | 465 | zDir = blob_str(pPath); |
| @@ -477,11 +479,11 @@ | ||
| 477 | 479 | zPath = blob_str(pPath); |
| 478 | 480 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 479 | 481 | /* do nothing */ |
| 480 | 482 | }else if( file_wd_isdir(zPath)==1 ){ |
| 481 | 483 | if( !vfile_top_of_checkout(zPath) ){ |
| 482 | - vfile_scan(pPath, nPrefix, scanFlags, pIgnore); | |
| 484 | + vfile_scan(pPath, nPrefix, scanFlags, pIgnore, caseSensitive); | |
| 483 | 485 | } |
| 484 | 486 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 485 | 487 | if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ |
| 486 | 488 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | 489 | db_step(&ins); |
| 488 | 490 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -432,11 +432,12 @@ | |
| 432 | ** |
| 433 | ** Any files or directories that match the glob pattern pIgnore are |
| 434 | ** excluded from the scan. Name matching occurs after the first |
| 435 | ** nPrefix characters are elided from the filename. |
| 436 | */ |
| 437 | void vfile_scan(Blob *pPath, int nPrefix, unsigned scanFlags, Glob *pIgnore){ |
| 438 | DIR *d; |
| 439 | int origSize; |
| 440 | const char *zDir; |
| 441 | struct dirent *pEntry; |
| 442 | int skipAll = 0; |
| @@ -453,11 +454,12 @@ | |
| 453 | if( skipAll ) return; |
| 454 | |
| 455 | if( depth==0 ){ |
| 456 | db_prepare(&ins, |
| 457 | "INSERT OR IGNORE INTO sfile(x) SELECT :file" |
| 458 | " WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE pathname=:file)" |
| 459 | ); |
| 460 | } |
| 461 | depth++; |
| 462 | |
| 463 | zDir = blob_str(pPath); |
| @@ -477,11 +479,11 @@ | |
| 477 | zPath = blob_str(pPath); |
| 478 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 479 | /* do nothing */ |
| 480 | }else if( file_wd_isdir(zPath)==1 ){ |
| 481 | if( !vfile_top_of_checkout(zPath) ){ |
| 482 | vfile_scan(pPath, nPrefix, scanFlags, pIgnore); |
| 483 | } |
| 484 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 485 | if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ |
| 486 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 487 | db_step(&ins); |
| 488 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -432,11 +432,12 @@ | |
| 432 | ** |
| 433 | ** Any files or directories that match the glob pattern pIgnore are |
| 434 | ** excluded from the scan. Name matching occurs after the first |
| 435 | ** nPrefix characters are elided from the filename. |
| 436 | */ |
| 437 | void vfile_scan(Blob *pPath, int nPrefix, unsigned scanFlags, Glob *pIgnore, |
| 438 | int caseSensitive){ |
| 439 | DIR *d; |
| 440 | int origSize; |
| 441 | const char *zDir; |
| 442 | struct dirent *pEntry; |
| 443 | int skipAll = 0; |
| @@ -453,11 +454,12 @@ | |
| 454 | if( skipAll ) return; |
| 455 | |
| 456 | if( depth==0 ){ |
| 457 | db_prepare(&ins, |
| 458 | "INSERT OR IGNORE INTO sfile(x) SELECT :file" |
| 459 | " WHERE NOT EXISTS(SELECT 1 FROM vfile WHERE" |
| 460 | " pathname=:file %s)", caseSensitive ? "" : "COLLATE nocase" |
| 461 | ); |
| 462 | } |
| 463 | depth++; |
| 464 | |
| 465 | zDir = blob_str(pPath); |
| @@ -477,11 +479,11 @@ | |
| 479 | zPath = blob_str(pPath); |
| 480 | if( glob_match(pIgnore, &zPath[nPrefix+1]) ){ |
| 481 | /* do nothing */ |
| 482 | }else if( file_wd_isdir(zPath)==1 ){ |
| 483 | if( !vfile_top_of_checkout(zPath) ){ |
| 484 | vfile_scan(pPath, nPrefix, scanFlags, pIgnore, caseSensitive); |
| 485 | } |
| 486 | }else if( file_wd_isfile_or_link(zPath) ){ |
| 487 | if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){ |
| 488 | db_bind_text(&ins, ":file", &zPath[nPrefix+1]); |
| 489 | db_step(&ins); |
| 490 |