Fossil SCM
Timeline computes the main branch name once, instead of once per row.
Commit
fa3e6ed20a62a963d5b2ec99c1e43348dc1eb5e222caad78d07451b7e5b5fe9f
Parent
37955439114af32…
1 file changed
+2
-1
+2
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -349,10 +349,12 @@ | ||
| 349 | 349 | const char *zStyle; /* Sub-name for classes for the style */ |
| 350 | 350 | const char *zDateFmt; |
| 351 | 351 | int iTableId = timeline_tableid(); |
| 352 | 352 | int bTimestampLinksToInfo; /* True if timestamp hyperlinks go to the /info |
| 353 | 353 | ** page rather than the /timeline page */ |
| 354 | + char *zMainBranch = db_get("main-branch","trunk"); | |
| 355 | + | |
| 354 | 356 | |
| 355 | 357 | if( cgi_is_loopback(g.zIpAddr) && db_open_local(0) ){ |
| 356 | 358 | vid = db_lget_int("checkout", 0); |
| 357 | 359 | } |
| 358 | 360 | if( xExtra==0 ) xExtra = defaultExtra; |
| @@ -404,11 +406,10 @@ | ||
| 404 | 406 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 405 | 407 | int gidx = 0; /* Graph row identifier */ |
| 406 | 408 | int isSelectedOrCurrent = 0; /* True if current row is selected */ |
| 407 | 409 | const char *zExtraClass = ""; |
| 408 | 410 | char zTime[20]; |
| 409 | - char *zMainBranch = db_get("main-branch","trunk"); | |
| 410 | 411 | |
| 411 | 412 | if( zDate==0 ){ |
| 412 | 413 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 413 | 414 | } |
| 414 | 415 | modPending = moderation_pending(rid); |
| 415 | 416 |
| --- 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 |