Fossil SCM

In "fossil whatis" for an ambiguous name, count a ticket among the meanings, so that it is numbered after the artifacts before it, and omit the separator before a ticket that is the first meaning listed, which made the --json output invalid.

dmestas 2026-11-22 11:47 UTC small-fixes
Commit cf33e7e2ed3eef1bbf1c2c858d448e789147c8763b988c023eb0dc3b1c73b144
1 file changed +6 -4
+6 -4
--- src/name.c
+++ src/name.c
@@ -1501,14 +1501,16 @@
15011501
" ORDER BY mtime LIMIT 1)"
15021502
" FROM tag WHERE tagname GLOB 'tkt-%q*'",
15031503
zC
15041504
);
15051505
while( db_step(&q)==SQLITE_ROW ){
1506
- if( pOut ){
1507
- sqlite3_str_append(pOut, ",", 1);
1508
- }else{
1509
- fossil_print("%12s---- meaning #%d ----\n", " ", cnt);
1506
+ if( cnt++ ){
1507
+ if( pOut ){
1508
+ sqlite3_str_append(pOut, ",", 1);
1509
+ }else{
1510
+ fossil_print("%12s---- meaning #%d ----\n", " ", cnt);
1511
+ }
15101512
}
15111513
whatis_rid(db_column_int(&q, 0), mFlags, pOut);
15121514
}
15131515
db_finalize(&q);
15141516
}
15151517
--- src/name.c
+++ src/name.c
@@ -1501,14 +1501,16 @@
1501 " ORDER BY mtime LIMIT 1)"
1502 " FROM tag WHERE tagname GLOB 'tkt-%q*'",
1503 zC
1504 );
1505 while( db_step(&q)==SQLITE_ROW ){
1506 if( pOut ){
1507 sqlite3_str_append(pOut, ",", 1);
1508 }else{
1509 fossil_print("%12s---- meaning #%d ----\n", " ", cnt);
 
 
1510 }
1511 whatis_rid(db_column_int(&q, 0), mFlags, pOut);
1512 }
1513 db_finalize(&q);
1514 }
1515
--- src/name.c
+++ src/name.c
@@ -1501,14 +1501,16 @@
1501 " ORDER BY mtime LIMIT 1)"
1502 " FROM tag WHERE tagname GLOB 'tkt-%q*'",
1503 zC
1504 );
1505 while( db_step(&q)==SQLITE_ROW ){
1506 if( cnt++ ){
1507 if( pOut ){
1508 sqlite3_str_append(pOut, ",", 1);
1509 }else{
1510 fossil_print("%12s---- meaning #%d ----\n", " ", cnt);
1511 }
1512 }
1513 whatis_rid(db_column_int(&q, 0), mFlags, pOut);
1514 }
1515 db_finalize(&q);
1516 }
1517

Keyboard Shortcuts

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