Fossil SCM

Timeline computes the main branch name once, instead of once per row.

drh 2025-10-16 15:10 timeline-enhance-2025
Commit fa3e6ed20a62a963d5b2ec99c1e43348dc1eb5e222caad78d07451b7e5b5fe9f
1 file changed +2 -1
+2 -1
--- src/timeline.c
+++ src/timeline.c
@@ -349,10 +349,12 @@
349349
const char *zStyle; /* Sub-name for classes for the style */
350350
const char *zDateFmt;
351351
int iTableId = timeline_tableid();
352352
int bTimestampLinksToInfo; /* True if timestamp hyperlinks go to the /info
353353
** page rather than the /timeline page */
354
+ char *zMainBranch = db_get("main-branch","trunk");
355
+
354356
355357
if( cgi_is_loopback(g.zIpAddr) && db_open_local(0) ){
356358
vid = db_lget_int("checkout", 0);
357359
}
358360
if( xExtra==0 ) xExtra = defaultExtra;
@@ -404,11 +406,10 @@
404406
int drawDetailEllipsis; /* True to show ellipsis in place of detail */
405407
int gidx = 0; /* Graph row identifier */
406408
int isSelectedOrCurrent = 0; /* True if current row is selected */
407409
const char *zExtraClass = "";
408410
char zTime[20];
409
- char *zMainBranch = db_get("main-branch","trunk");
410411
411412
if( zDate==0 ){
412413
zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */
413414
}
414415
modPending = moderation_pending(rid);
415416
--- src/timeline.c
+++ src/timeline.c
@@ -349,10 +349,12 @@
349 const char *zStyle; /* Sub-name for classes for the style */
350 const char *zDateFmt;
351 int iTableId = timeline_tableid();
352 int bTimestampLinksToInfo; /* True if timestamp hyperlinks go to the /info
353 ** page rather than the /timeline page */
 
 
354
355 if( cgi_is_loopback(g.zIpAddr) && db_open_local(0) ){
356 vid = db_lget_int("checkout", 0);
357 }
358 if( xExtra==0 ) xExtra = defaultExtra;
@@ -404,11 +406,10 @@
404 int drawDetailEllipsis; /* True to show ellipsis in place of detail */
405 int gidx = 0; /* Graph row identifier */
406 int isSelectedOrCurrent = 0; /* True if current row is selected */
407 const char *zExtraClass = "";
408 char zTime[20];
409 char *zMainBranch = db_get("main-branch","trunk");
410
411 if( zDate==0 ){
412 zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */
413 }
414 modPending = moderation_pending(rid);
415
--- src/timeline.c
+++ src/timeline.c
@@ -349,10 +349,12 @@
349 const char *zStyle; /* Sub-name for classes for the style */
350 const char *zDateFmt;
351 int iTableId = timeline_tableid();
352 int bTimestampLinksToInfo; /* True if timestamp hyperlinks go to the /info
353 ** page rather than the /timeline page */
354 char *zMainBranch = db_get("main-branch","trunk");
355
356
357 if( cgi_is_loopback(g.zIpAddr) && db_open_local(0) ){
358 vid = db_lget_int("checkout", 0);
359 }
360 if( xExtra==0 ) xExtra = defaultExtra;
@@ -404,11 +406,10 @@
406 int drawDetailEllipsis; /* True to show ellipsis in place of detail */
407 int gidx = 0; /* Graph row identifier */
408 int isSelectedOrCurrent = 0; /* True if current row is selected */
409 const char *zExtraClass = "";
410 char zTime[20];
 
411
412 if( zDate==0 ){
413 zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */
414 }
415 modPending = moderation_pending(rid);
416

Keyboard Shortcuts

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