Fossil SCM
Remove unused 0 argument. No functional change.
Commit
d56b84837355067038b39368f0b8d64dc6e56e52
Parent
6f212b5ffd39fcd…
2 files changed
+1
-1
+4
-7
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -777,11 +777,11 @@ | ||
| 777 | 777 | Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0)); |
| 778 | 778 | Stmt q; |
| 779 | 779 | Blob root; |
| 780 | 780 | blob_init(&root, g.zLocalRoot, nRoot - 1); |
| 781 | 781 | vfile_dir_scan(&root, blob_size(&root), scanFlags, pIgnore, |
| 782 | - pEmptyDirs, 0); | |
| 782 | + pEmptyDirs); | |
| 783 | 783 | blob_reset(&root); |
| 784 | 784 | db_prepare(&q, |
| 785 | 785 | "SELECT %Q || x FROM dscan_temp" |
| 786 | 786 | " WHERE x NOT IN (%s) AND y = 0" |
| 787 | 787 | " ORDER BY 1 DESC", |
| 788 | 788 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -777,11 +777,11 @@ | |
| 777 | Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0)); |
| 778 | Stmt q; |
| 779 | Blob root; |
| 780 | blob_init(&root, g.zLocalRoot, nRoot - 1); |
| 781 | vfile_dir_scan(&root, blob_size(&root), scanFlags, pIgnore, |
| 782 | pEmptyDirs, 0); |
| 783 | blob_reset(&root); |
| 784 | db_prepare(&q, |
| 785 | "SELECT %Q || x FROM dscan_temp" |
| 786 | " WHERE x NOT IN (%s) AND y = 0" |
| 787 | " ORDER BY 1 DESC", |
| 788 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -777,11 +777,11 @@ | |
| 777 | Glob *pEmptyDirs = glob_create(db_get("empty-dirs", 0)); |
| 778 | Stmt q; |
| 779 | Blob root; |
| 780 | blob_init(&root, g.zLocalRoot, nRoot - 1); |
| 781 | vfile_dir_scan(&root, blob_size(&root), scanFlags, pIgnore, |
| 782 | pEmptyDirs); |
| 783 | blob_reset(&root); |
| 784 | db_prepare(&q, |
| 785 | "SELECT %Q || x FROM dscan_temp" |
| 786 | " WHERE x NOT IN (%s) AND y = 0" |
| 787 | " ORDER BY 1 DESC", |
| 788 |
+4
-7
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -546,12 +546,11 @@ | ||
| 546 | 546 | int vfile_dir_scan( |
| 547 | 547 | Blob *pPath, /* Base directory to be scanned */ |
| 548 | 548 | int nPrefix, /* Number of bytes in base directory name */ |
| 549 | 549 | unsigned scanFlags, /* Zero or more SCAN_xxx flags */ |
| 550 | 550 | Glob *pIgnore1, /* Do not add directories that match this GLOB */ |
| 551 | - Glob *pIgnore2, /* Omit directories matching this GLOB too */ | |
| 552 | - Glob *pIgnore3 /* Omit directories matching this GLOB too */ | |
| 551 | + Glob *pIgnore2 /* Omit directories matching this GLOB too */ | |
| 553 | 552 | ){ |
| 554 | 553 | int result = 0; |
| 555 | 554 | DIR *d; |
| 556 | 555 | int origSize; |
| 557 | 556 | struct dirent *pEntry; |
| @@ -560,15 +559,14 @@ | ||
| 560 | 559 | static Stmt upd; |
| 561 | 560 | static int depth = 0; |
| 562 | 561 | void *zNative; |
| 563 | 562 | |
| 564 | 563 | origSize = blob_size(pPath); |
| 565 | - if( pIgnore1 || pIgnore2 || pIgnore3 ){ | |
| 564 | + if( pIgnore1 || pIgnore2 ){ | |
| 566 | 565 | blob_appendf(pPath, "/"); |
| 567 | 566 | if( glob_match(pIgnore1, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| 568 | 567 | if( glob_match(pIgnore2, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| 569 | - if( glob_match(pIgnore3, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; | |
| 570 | 568 | blob_resize(pPath, origSize); |
| 571 | 569 | } |
| 572 | 570 | if( skipAll ) return result; |
| 573 | 571 | |
| 574 | 572 | if( depth==0 ){ |
| @@ -604,12 +602,11 @@ | ||
| 604 | 602 | zOrigPath = mprintf("%s", blob_str(pPath)); |
| 605 | 603 | zUtf8 = fossil_filename_to_utf8(pEntry->d_name); |
| 606 | 604 | blob_appendf(pPath, "/%s", zUtf8); |
| 607 | 605 | zPath = blob_str(pPath); |
| 608 | 606 | if( glob_match(pIgnore1, &zPath[nPrefix+1]) || |
| 609 | - glob_match(pIgnore2, &zPath[nPrefix+1]) || | |
| 610 | - glob_match(pIgnore3, &zPath[nPrefix+1]) ){ | |
| 607 | + glob_match(pIgnore2, &zPath[nPrefix+1]) ){ | |
| 611 | 608 | /* do nothing */ |
| 612 | 609 | #ifdef _DIRENT_HAVE_D_TYPE |
| 613 | 610 | }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK) |
| 614 | 611 | ? (file_wd_isdir(zPath)==1) : (pEntry->d_type==DT_DIR) ){ |
| 615 | 612 | #else |
| @@ -616,11 +613,11 @@ | ||
| 616 | 613 | }else if( file_wd_isdir(zPath)==1 ){ |
| 617 | 614 | #endif |
| 618 | 615 | if( (scanFlags & SCAN_NESTED) || !vfile_top_of_checkout(zPath) ){ |
| 619 | 616 | char *zSavePath = mprintf("%s", zPath); |
| 620 | 617 | int count = vfile_dir_scan(pPath, nPrefix, scanFlags, pIgnore1, |
| 621 | - pIgnore2, pIgnore3); | |
| 618 | + pIgnore2); | |
| 622 | 619 | db_bind_text(&ins, ":file", &zSavePath[nPrefix+1]); |
| 623 | 620 | db_bind_int(&ins, ":count", count); |
| 624 | 621 | db_step(&ins); |
| 625 | 622 | db_reset(&ins); |
| 626 | 623 | fossil_free(zSavePath); |
| 627 | 624 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -546,12 +546,11 @@ | |
| 546 | int vfile_dir_scan( |
| 547 | Blob *pPath, /* Base directory to be scanned */ |
| 548 | int nPrefix, /* Number of bytes in base directory name */ |
| 549 | unsigned scanFlags, /* Zero or more SCAN_xxx flags */ |
| 550 | Glob *pIgnore1, /* Do not add directories that match this GLOB */ |
| 551 | Glob *pIgnore2, /* Omit directories matching this GLOB too */ |
| 552 | Glob *pIgnore3 /* Omit directories matching this GLOB too */ |
| 553 | ){ |
| 554 | int result = 0; |
| 555 | DIR *d; |
| 556 | int origSize; |
| 557 | struct dirent *pEntry; |
| @@ -560,15 +559,14 @@ | |
| 560 | static Stmt upd; |
| 561 | static int depth = 0; |
| 562 | void *zNative; |
| 563 | |
| 564 | origSize = blob_size(pPath); |
| 565 | if( pIgnore1 || pIgnore2 || pIgnore3 ){ |
| 566 | blob_appendf(pPath, "/"); |
| 567 | if( glob_match(pIgnore1, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| 568 | if( glob_match(pIgnore2, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| 569 | if( glob_match(pIgnore3, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| 570 | blob_resize(pPath, origSize); |
| 571 | } |
| 572 | if( skipAll ) return result; |
| 573 | |
| 574 | if( depth==0 ){ |
| @@ -604,12 +602,11 @@ | |
| 604 | zOrigPath = mprintf("%s", blob_str(pPath)); |
| 605 | zUtf8 = fossil_filename_to_utf8(pEntry->d_name); |
| 606 | blob_appendf(pPath, "/%s", zUtf8); |
| 607 | zPath = blob_str(pPath); |
| 608 | if( glob_match(pIgnore1, &zPath[nPrefix+1]) || |
| 609 | glob_match(pIgnore2, &zPath[nPrefix+1]) || |
| 610 | glob_match(pIgnore3, &zPath[nPrefix+1]) ){ |
| 611 | /* do nothing */ |
| 612 | #ifdef _DIRENT_HAVE_D_TYPE |
| 613 | }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK) |
| 614 | ? (file_wd_isdir(zPath)==1) : (pEntry->d_type==DT_DIR) ){ |
| 615 | #else |
| @@ -616,11 +613,11 @@ | |
| 616 | }else if( file_wd_isdir(zPath)==1 ){ |
| 617 | #endif |
| 618 | if( (scanFlags & SCAN_NESTED) || !vfile_top_of_checkout(zPath) ){ |
| 619 | char *zSavePath = mprintf("%s", zPath); |
| 620 | int count = vfile_dir_scan(pPath, nPrefix, scanFlags, pIgnore1, |
| 621 | pIgnore2, pIgnore3); |
| 622 | db_bind_text(&ins, ":file", &zSavePath[nPrefix+1]); |
| 623 | db_bind_int(&ins, ":count", count); |
| 624 | db_step(&ins); |
| 625 | db_reset(&ins); |
| 626 | fossil_free(zSavePath); |
| 627 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -546,12 +546,11 @@ | |
| 546 | int vfile_dir_scan( |
| 547 | Blob *pPath, /* Base directory to be scanned */ |
| 548 | int nPrefix, /* Number of bytes in base directory name */ |
| 549 | unsigned scanFlags, /* Zero or more SCAN_xxx flags */ |
| 550 | Glob *pIgnore1, /* Do not add directories that match this GLOB */ |
| 551 | Glob *pIgnore2 /* Omit directories matching this GLOB too */ |
| 552 | ){ |
| 553 | int result = 0; |
| 554 | DIR *d; |
| 555 | int origSize; |
| 556 | struct dirent *pEntry; |
| @@ -560,15 +559,14 @@ | |
| 559 | static Stmt upd; |
| 560 | static int depth = 0; |
| 561 | void *zNative; |
| 562 | |
| 563 | origSize = blob_size(pPath); |
| 564 | if( pIgnore1 || pIgnore2 ){ |
| 565 | blob_appendf(pPath, "/"); |
| 566 | if( glob_match(pIgnore1, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| 567 | if( glob_match(pIgnore2, &blob_str(pPath)[nPrefix+1]) ) skipAll = 1; |
| 568 | blob_resize(pPath, origSize); |
| 569 | } |
| 570 | if( skipAll ) return result; |
| 571 | |
| 572 | if( depth==0 ){ |
| @@ -604,12 +602,11 @@ | |
| 602 | zOrigPath = mprintf("%s", blob_str(pPath)); |
| 603 | zUtf8 = fossil_filename_to_utf8(pEntry->d_name); |
| 604 | blob_appendf(pPath, "/%s", zUtf8); |
| 605 | zPath = blob_str(pPath); |
| 606 | if( glob_match(pIgnore1, &zPath[nPrefix+1]) || |
| 607 | glob_match(pIgnore2, &zPath[nPrefix+1]) ){ |
| 608 | /* do nothing */ |
| 609 | #ifdef _DIRENT_HAVE_D_TYPE |
| 610 | }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK) |
| 611 | ? (file_wd_isdir(zPath)==1) : (pEntry->d_type==DT_DIR) ){ |
| 612 | #else |
| @@ -616,11 +613,11 @@ | |
| 613 | }else if( file_wd_isdir(zPath)==1 ){ |
| 614 | #endif |
| 615 | if( (scanFlags & SCAN_NESTED) || !vfile_top_of_checkout(zPath) ){ |
| 616 | char *zSavePath = mprintf("%s", zPath); |
| 617 | int count = vfile_dir_scan(pPath, nPrefix, scanFlags, pIgnore1, |
| 618 | pIgnore2); |
| 619 | db_bind_text(&ins, ":file", &zSavePath[nPrefix+1]); |
| 620 | db_bind_int(&ins, ":count", count); |
| 621 | db_step(&ins); |
| 622 | db_reset(&ins); |
| 623 | fossil_free(zSavePath); |
| 624 |