Fossil SCM
Move an invariable test outside a while loop.
Commit
b87bd729278fca0a023a867f219b4e93d43121adf4fa126b1039e71ff63bd905
Parent
a402dd2a888d6d7…
1 file changed
+4
-3
+4
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -3003,10 +3003,12 @@ | ||
| 3003 | 3003 | char zPrevDate[20]; |
| 3004 | 3004 | const char *zCurrentUuid = 0; |
| 3005 | 3005 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 3006 | 3006 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 3007 | 3007 | int rc; |
| 3008 | + int bVerboseNewline = (zFormat!=0 && (fossil_strcmp(zFormat, "%h %c")!=0) ); | |
| 3009 | + /* True: print a newline after file listing */ | |
| 3008 | 3010 | |
| 3009 | 3011 | zPrevDate[0] = 0; |
| 3010 | 3012 | if( g.localOpen ){ |
| 3011 | 3013 | int rid = db_lget_int("checkout", 0); |
| 3012 | 3014 | zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| @@ -3138,13 +3140,12 @@ | ||
| 3138 | 3140 | } |
| 3139 | 3141 | db_reset(&fchngQuery); |
| 3140 | 3142 | } |
| 3141 | 3143 | /* With special formatting (except for "oneline") and --verbose, |
| 3142 | 3144 | ** print a newline after the file listing */ |
| 3143 | - if( zFormat!=0 && (fossil_strcmp(zFormat, "%h %c")!=0) ){ | |
| 3144 | - fossil_print("\n"); | |
| 3145 | - } | |
| 3145 | + if( bVerboseNewline ) fossil_print("\n"); | |
| 3146 | + | |
| 3146 | 3147 | nEntry++; /* record another complete entry */ |
| 3147 | 3148 | } |
| 3148 | 3149 | if( rc==SQLITE_DONE ){ |
| 3149 | 3150 | /* Did the underlying query actually have all entries? */ |
| 3150 | 3151 | if( nAbsLimit==0 ){ |
| 3151 | 3152 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -3003,10 +3003,12 @@ | |
| 3003 | char zPrevDate[20]; |
| 3004 | const char *zCurrentUuid = 0; |
| 3005 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 3006 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 3007 | int rc; |
| 3008 | |
| 3009 | zPrevDate[0] = 0; |
| 3010 | if( g.localOpen ){ |
| 3011 | int rid = db_lget_int("checkout", 0); |
| 3012 | zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| @@ -3138,13 +3140,12 @@ | |
| 3138 | } |
| 3139 | db_reset(&fchngQuery); |
| 3140 | } |
| 3141 | /* With special formatting (except for "oneline") and --verbose, |
| 3142 | ** print a newline after the file listing */ |
| 3143 | if( zFormat!=0 && (fossil_strcmp(zFormat, "%h %c")!=0) ){ |
| 3144 | fossil_print("\n"); |
| 3145 | } |
| 3146 | nEntry++; /* record another complete entry */ |
| 3147 | } |
| 3148 | if( rc==SQLITE_DONE ){ |
| 3149 | /* Did the underlying query actually have all entries? */ |
| 3150 | if( nAbsLimit==0 ){ |
| 3151 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -3003,10 +3003,12 @@ | |
| 3003 | char zPrevDate[20]; |
| 3004 | const char *zCurrentUuid = 0; |
| 3005 | int fchngQueryInit = 0; /* True if fchngQuery is initialized */ |
| 3006 | Stmt fchngQuery; /* Query for file changes on check-ins */ |
| 3007 | int rc; |
| 3008 | int bVerboseNewline = (zFormat!=0 && (fossil_strcmp(zFormat, "%h %c")!=0) ); |
| 3009 | /* True: print a newline after file listing */ |
| 3010 | |
| 3011 | zPrevDate[0] = 0; |
| 3012 | if( g.localOpen ){ |
| 3013 | int rid = db_lget_int("checkout", 0); |
| 3014 | zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| @@ -3138,13 +3140,12 @@ | |
| 3140 | } |
| 3141 | db_reset(&fchngQuery); |
| 3142 | } |
| 3143 | /* With special formatting (except for "oneline") and --verbose, |
| 3144 | ** print a newline after the file listing */ |
| 3145 | if( bVerboseNewline ) fossil_print("\n"); |
| 3146 | |
| 3147 | nEntry++; /* record another complete entry */ |
| 3148 | } |
| 3149 | if( rc==SQLITE_DONE ){ |
| 3150 | /* Did the underlying query actually have all entries? */ |
| 3151 | if( nAbsLimit==0 ){ |
| 3152 |