mirror of
https://git.zx2c4.com/cgit
synced 2025-08-16 15:31:57 +02:00
ui-tree: unify with ui-view, use path to select tree/blob
This teaches ui-tree to show both trees and blobs, thereby making ui-view superfluous. At the same time, ui-tree is extended to honour the specified path instead of requiering a tree/blob sha1.
This commit is contained in:
parent
849f0f0f02
commit
ffc69736a6
8 changed files with 180 additions and 118 deletions
|
@ -182,8 +182,7 @@ void cgit_print_commit(const char *hex)
|
|||
cgit_print_date(info->committer_date, FMT_LONGDATE);
|
||||
html("</td></tr>\n");
|
||||
html("<tr><th>tree</th><td colspan='2' class='sha1'><a href='");
|
||||
query = fmt("h=%s&id=%s", sha1_to_hex(commit->object.sha1),
|
||||
sha1_to_hex(commit->tree->object.sha1));
|
||||
query = fmt("h=%s", sha1_to_hex(commit->object.sha1));
|
||||
html_attr(cgit_pageurl(cgit_query_repo, "tree", query));
|
||||
htmlf("'>%s</a></td></tr>\n", sha1_to_hex(commit->tree->object.sha1));
|
||||
for (p = commit->parents; p ; p = p->next) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue