Fossil SCM

Move an invariable test outside a while loop.

danield 2023-11-14 21:29 trunk
Commit b87bd729278fca0a023a867f219b4e93d43121adf4fa126b1039e71ff63bd905
1 file changed +4 -3
+4 -3
--- src/timeline.c
+++ src/timeline.c
@@ -3003,10 +3003,12 @@
30033003
char zPrevDate[20];
30043004
const char *zCurrentUuid = 0;
30053005
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
30063006
Stmt fchngQuery; /* Query for file changes on check-ins */
30073007
int rc;
3008
+ int bVerboseNewline = (zFormat!=0 && (fossil_strcmp(zFormat, "%h %c")!=0) );
3009
+ /* True: print a newline after file listing */
30083010
30093011
zPrevDate[0] = 0;
30103012
if( g.localOpen ){
30113013
int rid = db_lget_int("checkout", 0);
30123014
zCurrentUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -3138,13 +3140,12 @@
31383140
}
31393141
db_reset(&fchngQuery);
31403142
}
31413143
/* With special formatting (except for "oneline") and --verbose,
31423144
** 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
+
31463147
nEntry++; /* record another complete entry */
31473148
}
31483149
if( rc==SQLITE_DONE ){
31493150
/* Did the underlying query actually have all entries? */
31503151
if( nAbsLimit==0 ){
31513152
--- 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

Keyboard Shortcuts

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