Fossil SCM

Always include the "Annotate" and "Blame" submenu items of the /file page, not just for cases of text/ mimetypes, since some files (ex: Makefile.in) do not have a well-defined mimetype, but we do want to Annotate them.

drh 2021-01-09 18:43 trunk
Commit b84b8bf3591ce225eb4ab9e071f0ef343c58c3b45b83907538e1529c16755187
1 file changed +4 -6
+4 -6
--- src/info.c
+++ src/info.c
@@ -2367,16 +2367,14 @@
23672367
}
23682368
blob_reset(&path);
23692369
}
23702370
style_submenu_element("Artifact", "%R/artifact/%S", zUuid);
23712371
zMime = mimetype_from_name(zName);
2372
- if( zMime && strncmp(zMime, "text/", 5)==0 ){
2373
- style_submenu_element("Annotate", "%R/annotate?filename=%T&checkin=%T",
2374
- zName, zCI);
2375
- style_submenu_element("Blame", "%R/blame?filename=%T&checkin=%T",
2376
- zName, zCI);
2377
- }
2372
+ style_submenu_element("Annotate", "%R/annotate?filename=%T&checkin=%T",
2373
+ zName, zCI);
2374
+ style_submenu_element("Blame", "%R/blame?filename=%T&checkin=%T",
2375
+ zName, zCI);
23782376
blob_init(&downloadName, zName, -1);
23792377
objType = OBJTYPE_CONTENT;
23802378
}else{
23812379
@ <h2>Artifact
23822380
style_copy_button(1, "hash-ar", 0, 2, "%s", zUuid);
23832381
--- src/info.c
+++ src/info.c
@@ -2367,16 +2367,14 @@
2367 }
2368 blob_reset(&path);
2369 }
2370 style_submenu_element("Artifact", "%R/artifact/%S", zUuid);
2371 zMime = mimetype_from_name(zName);
2372 if( zMime && strncmp(zMime, "text/", 5)==0 ){
2373 style_submenu_element("Annotate", "%R/annotate?filename=%T&checkin=%T",
2374 zName, zCI);
2375 style_submenu_element("Blame", "%R/blame?filename=%T&checkin=%T",
2376 zName, zCI);
2377 }
2378 blob_init(&downloadName, zName, -1);
2379 objType = OBJTYPE_CONTENT;
2380 }else{
2381 @ <h2>Artifact
2382 style_copy_button(1, "hash-ar", 0, 2, "%s", zUuid);
2383
--- src/info.c
+++ src/info.c
@@ -2367,16 +2367,14 @@
2367 }
2368 blob_reset(&path);
2369 }
2370 style_submenu_element("Artifact", "%R/artifact/%S", zUuid);
2371 zMime = mimetype_from_name(zName);
2372 style_submenu_element("Annotate", "%R/annotate?filename=%T&checkin=%T",
2373 zName, zCI);
2374 style_submenu_element("Blame", "%R/blame?filename=%T&checkin=%T",
2375 zName, zCI);
 
 
2376 blob_init(&downloadName, zName, -1);
2377 objType = OBJTYPE_CONTENT;
2378 }else{
2379 @ <h2>Artifact
2380 style_copy_button(1, "hash-ar", 0, 2, "%s", zUuid);
2381

Keyboard Shortcuts

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