Fossil SCM

Reverse the logic of the "--brief|-b" flag of the finfo command so it fits with the flag name. (no functional change)

mgagnon 2024-09-20 22:30 trunk
Commit b8e378bcf85ae181aba685004c671d46556edb07452247de849c7442e91a8235
1 file changed +3 -3
+3 -3
--- src/finfo.c
+++ src/finfo.c
@@ -185,11 +185,11 @@
185185
zLimit = find_option("limit","n",1);
186186
zWidth = find_option("width","W",1);
187187
iLimit = zLimit ? atoi(zLimit) : -1;
188188
zOffset = find_option("offset",0,1);
189189
iOffset = zOffset ? atoi(zOffset) : 0;
190
- iBrief = (find_option("brief","b",0) == 0);
190
+ iBrief = find_option("brief","b",0) != 0;
191191
if( iLimit==0 ){
192192
iLimit = -1;
193193
}
194194
if( zWidth ){
195195
iWidth = atoi(zWidth);
@@ -228,11 +228,11 @@
228228
" ORDER BY event.mtime DESC LIMIT %d OFFSET %d",
229229
TAG_BRANCH, zFilename, filename_collation(),
230230
iLimit, iOffset
231231
);
232232
blob_zero(&line);
233
- if( iBrief ){
233
+ if( iBrief == 0 ){
234234
fossil_print("History for %s\n", blob_str(&fname));
235235
}
236236
while( db_step(&q)==SQLITE_ROW ){
237237
const char *zFileUuid = db_column_text(&q, 0);
238238
const char *zCiUuid = db_column_text(&q,1);
@@ -240,11 +240,11 @@
240240
const char *zCom = db_column_text(&q, 3);
241241
const char *zUser = db_column_text(&q, 4);
242242
const char *zBr = db_column_text(&q, 5);
243243
char *zOut;
244244
if( zBr==0 ) zBr = "trunk";
245
- if( iBrief ){
245
+ if( iBrief == 0 ){
246246
fossil_print("%s ", zDate);
247247
zOut = mprintf(
248248
"[%S] %s (user: %s, artifact: [%S], branch: %s)",
249249
zCiUuid, zCom, zUser, zFileUuid, zBr);
250250
comment_print(zOut, zCom, 11, iWidth, get_comment_format());
251251
--- src/finfo.c
+++ src/finfo.c
@@ -185,11 +185,11 @@
185 zLimit = find_option("limit","n",1);
186 zWidth = find_option("width","W",1);
187 iLimit = zLimit ? atoi(zLimit) : -1;
188 zOffset = find_option("offset",0,1);
189 iOffset = zOffset ? atoi(zOffset) : 0;
190 iBrief = (find_option("brief","b",0) == 0);
191 if( iLimit==0 ){
192 iLimit = -1;
193 }
194 if( zWidth ){
195 iWidth = atoi(zWidth);
@@ -228,11 +228,11 @@
228 " ORDER BY event.mtime DESC LIMIT %d OFFSET %d",
229 TAG_BRANCH, zFilename, filename_collation(),
230 iLimit, iOffset
231 );
232 blob_zero(&line);
233 if( iBrief ){
234 fossil_print("History for %s\n", blob_str(&fname));
235 }
236 while( db_step(&q)==SQLITE_ROW ){
237 const char *zFileUuid = db_column_text(&q, 0);
238 const char *zCiUuid = db_column_text(&q,1);
@@ -240,11 +240,11 @@
240 const char *zCom = db_column_text(&q, 3);
241 const char *zUser = db_column_text(&q, 4);
242 const char *zBr = db_column_text(&q, 5);
243 char *zOut;
244 if( zBr==0 ) zBr = "trunk";
245 if( iBrief ){
246 fossil_print("%s ", zDate);
247 zOut = mprintf(
248 "[%S] %s (user: %s, artifact: [%S], branch: %s)",
249 zCiUuid, zCom, zUser, zFileUuid, zBr);
250 comment_print(zOut, zCom, 11, iWidth, get_comment_format());
251
--- src/finfo.c
+++ src/finfo.c
@@ -185,11 +185,11 @@
185 zLimit = find_option("limit","n",1);
186 zWidth = find_option("width","W",1);
187 iLimit = zLimit ? atoi(zLimit) : -1;
188 zOffset = find_option("offset",0,1);
189 iOffset = zOffset ? atoi(zOffset) : 0;
190 iBrief = find_option("brief","b",0) != 0;
191 if( iLimit==0 ){
192 iLimit = -1;
193 }
194 if( zWidth ){
195 iWidth = atoi(zWidth);
@@ -228,11 +228,11 @@
228 " ORDER BY event.mtime DESC LIMIT %d OFFSET %d",
229 TAG_BRANCH, zFilename, filename_collation(),
230 iLimit, iOffset
231 );
232 blob_zero(&line);
233 if( iBrief == 0 ){
234 fossil_print("History for %s\n", blob_str(&fname));
235 }
236 while( db_step(&q)==SQLITE_ROW ){
237 const char *zFileUuid = db_column_text(&q, 0);
238 const char *zCiUuid = db_column_text(&q,1);
@@ -240,11 +240,11 @@
240 const char *zCom = db_column_text(&q, 3);
241 const char *zUser = db_column_text(&q, 4);
242 const char *zBr = db_column_text(&q, 5);
243 char *zOut;
244 if( zBr==0 ) zBr = "trunk";
245 if( iBrief == 0 ){
246 fossil_print("%s ", zDate);
247 zOut = mprintf(
248 "[%S] %s (user: %s, artifact: [%S], branch: %s)",
249 zCiUuid, zCom, zUser, zFileUuid, zBr);
250 comment_print(zOut, zCom, 11, iWidth, get_comment_format());
251

Keyboard Shortcuts

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