Fossil SCM

Same optimization in "fossil reconstruct"

jan.nijtmans 2014-02-24 10:22 UTC use-d-type
Commit e1bcc99da3684574332b489b9defc142a8d36a0e
2 files changed +1 -1 +4 -4
+1 -1
--- src/rebuild.c
+++ src/rebuild.c
@@ -858,11 +858,11 @@
858858
continue;
859859
}
860860
zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
861861
zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
862862
fossil_filename_free(zUtf8Name);
863
-#ifdef XX_DIRENT_HAVE_D_TYPE
863
+#ifdef _DIRENT_HAVE_D_TYPE
864864
if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
865865
? (file_isdir(zSubpath)==1) : (pEntry->d_type==DT_DIR) )
866866
#else
867867
if( file_isdir(zSubpath)==1 )
868868
#endif
869869
--- src/rebuild.c
+++ src/rebuild.c
@@ -858,11 +858,11 @@
858 continue;
859 }
860 zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
861 zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
862 fossil_filename_free(zUtf8Name);
863 #ifdef XX_DIRENT_HAVE_D_TYPE
864 if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
865 ? (file_isdir(zSubpath)==1) : (pEntry->d_type==DT_DIR) )
866 #else
867 if( file_isdir(zSubpath)==1 )
868 #endif
869
--- src/rebuild.c
+++ src/rebuild.c
@@ -858,11 +858,11 @@
858 continue;
859 }
860 zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
861 zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
862 fossil_filename_free(zUtf8Name);
863 #ifdef _DIRENT_HAVE_D_TYPE
864 if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
865 ? (file_isdir(zSubpath)==1) : (pEntry->d_type==DT_DIR) )
866 #else
867 if( file_isdir(zSubpath)==1 )
868 #endif
869
+4 -4
--- src/vfile.c
+++ src/vfile.c
@@ -487,21 +487,21 @@
487487
zPath = blob_str(pPath);
488488
if( glob_match(pIgnore1, &zPath[nPrefix+1]) ||
489489
glob_match(pIgnore2, &zPath[nPrefix+1]) ){
490490
/* do nothing */
491491
#ifdef _DIRENT_HAVE_D_TYPE
492
- }else if( (pEntry->d_type==DT_UNKNOWN) ? (file_wd_isdir(zPath)==1)
493
- : (pEntry->d_type==DT_DIR) ){
492
+ }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
493
+ ? (file_wd_isdir(zPath)==1) : (pEntry->d_type==DT_DIR) ){
494494
#else
495495
}else if( file_wd_isdir(zPath)==1 ){
496496
#endif
497497
if( !vfile_top_of_checkout(zPath) ){
498498
vfile_scan(pPath, nPrefix, scanFlags, pIgnore1, pIgnore2);
499499
}
500500
#ifdef _DIRENT_HAVE_D_TYPE
501
- }else if( (pEntry->d_type==DT_UNKNOWN) ? (file_wd_isfile_or_link(zPath))
502
- : (pEntry->d_type==DT_REG||pEntry->d_type==DT_LNK) ){
501
+ }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
502
+ ? (file_wd_isfile_or_link(zPath)) : (pEntry->d_type==DT_REG) ){
503503
#else
504504
}else if( file_wd_isfile_or_link(zPath) ){
505505
#endif
506506
if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){
507507
db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
508508
--- src/vfile.c
+++ src/vfile.c
@@ -487,21 +487,21 @@
487 zPath = blob_str(pPath);
488 if( glob_match(pIgnore1, &zPath[nPrefix+1]) ||
489 glob_match(pIgnore2, &zPath[nPrefix+1]) ){
490 /* do nothing */
491 #ifdef _DIRENT_HAVE_D_TYPE
492 }else if( (pEntry->d_type==DT_UNKNOWN) ? (file_wd_isdir(zPath)==1)
493 : (pEntry->d_type==DT_DIR) ){
494 #else
495 }else if( file_wd_isdir(zPath)==1 ){
496 #endif
497 if( !vfile_top_of_checkout(zPath) ){
498 vfile_scan(pPath, nPrefix, scanFlags, pIgnore1, pIgnore2);
499 }
500 #ifdef _DIRENT_HAVE_D_TYPE
501 }else if( (pEntry->d_type==DT_UNKNOWN) ? (file_wd_isfile_or_link(zPath))
502 : (pEntry->d_type==DT_REG||pEntry->d_type==DT_LNK) ){
503 #else
504 }else if( file_wd_isfile_or_link(zPath) ){
505 #endif
506 if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){
507 db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
508
--- src/vfile.c
+++ src/vfile.c
@@ -487,21 +487,21 @@
487 zPath = blob_str(pPath);
488 if( glob_match(pIgnore1, &zPath[nPrefix+1]) ||
489 glob_match(pIgnore2, &zPath[nPrefix+1]) ){
490 /* do nothing */
491 #ifdef _DIRENT_HAVE_D_TYPE
492 }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
493 ? (file_wd_isdir(zPath)==1) : (pEntry->d_type==DT_DIR) ){
494 #else
495 }else if( file_wd_isdir(zPath)==1 ){
496 #endif
497 if( !vfile_top_of_checkout(zPath) ){
498 vfile_scan(pPath, nPrefix, scanFlags, pIgnore1, pIgnore2);
499 }
500 #ifdef _DIRENT_HAVE_D_TYPE
501 }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
502 ? (file_wd_isfile_or_link(zPath)) : (pEntry->d_type==DT_REG) ){
503 #else
504 }else if( file_wd_isfile_or_link(zPath) ){
505 #endif
506 if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){
507 db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
508

Keyboard Shortcuts

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