summaryrefslogtreecommitdiffstatshomepage
Commit message (Expand)AuthorAge
...
| * | Change "files" to "tree"Lars Hjemli2007-06-18
| * | Include querystring as part of cached filename for repo summary pageLars Hjemli2007-06-18
| * | Add more menuitems on repo pagesLars Hjemli2007-06-18
* | | Add version info from git-describeLars Hjemli2007-06-18
|/ /
* | Add cgit_diff_link()Lars Hjemli2007-06-17
* | ui-commit: use cgit_commit_link() for parent linksLars Hjemli2007-06-17
* | ui-log: honor id=sha1 on querystringLars Hjemli2007-06-17
* | Add cgit_commit_link() + support for id=sha1 to commit viewLars Hjemli2007-06-17
* | Add git_log_link() and fix bug in generic repolink functionLars Hjemli2007-06-17
* | ui-tree: html/css cleanupLars Hjemli2007-06-17
* | ui-shared: use strcmp() to compare stringsLars Hjemli2007-06-17
* | Add and use cgit_tree_link()Lars Hjemli2007-06-17
* | ui-tree: make blob viewer generate valid htmlLars Hjemli2007-06-16
* | ui-tree: unify with ui-view, use path to select tree/blobLars Hjemli2007-06-16
* | cgit.css: make it validateLars Hjemli2007-06-07
* | ui-diff: close td/tr/table properlyLars Hjemli2007-06-06
* | ui-diff: emit table/tr/td at better locationsLars Hjemli2007-06-05
|/
* Implemented configurable HEAD shortlog on summary page.Ondrej Jirman2007-05-31
* Check for NULL commit buffer in cgit_parse_commit()Ondrej Jirman2007-05-31
* Add option to disable pager to cgit_print_log().Ondrej Jirman2007-05-31
* Handle single-line and empty commit subjectsOndrej Jirman2007-05-31
* Use & instead of & in URLs.Ondrej Jirman2007-05-31
* Fixed unexpected tags in html output.Ondrej Jirman2007-05-31
* cgit v0.5v0.5Lars Hjemli2007-05-24
* Bad html: it's nice to add alt-attributesLars Hjemli2007-05-24
* Bad html: <form> should have an action-attributeLars Hjemli2007-05-24
* Close a <tr> properlyLars Hjemli2007-05-24
* Add repo.readme parameterLars Hjemli2007-05-23
* Remove unused variable from ui-repolist.c:read_agefile()Lars Hjemli2007-05-23
* Show time since last change on index pageLars Hjemli2007-05-22
* Use cgit_print_age() on summary and log pagesLars Hjemli2007-05-22
* Add cgit_print_age() functionLars Hjemli2007-05-22
* css: make column headings boldLars Hjemli2007-05-21
* Make frontpage friendlierLars Hjemli2007-05-21
* Merge branch 'repogroups'Lars Hjemli2007-05-20
|\
| * Adjust apperance of repogroup headersLars Hjemli2007-05-20
| * Don't highlight repogroup headingsLars Hjemli2007-05-18
| * Teach cgit how to group repositories by categoryLars Hjemli2007-05-18
* | Merge branch 'virtual-url'Lars Hjemli2007-05-20
|\ \
| * | Don't be fooled by trailing '/' in url-parameterLars Hjemli2007-05-18
| * | cache_safe_filename() needs more buffersLars Hjemli2007-05-18
| * | Enable url=value querystring parameterLars Hjemli2007-05-18
| * | Add lookup-function for valid repo commandsLars Hjemli2007-05-18
| * | Move cgit_get_repoinfo into shared.cLars Hjemli2007-05-18
| |/
* | Merge branch 'index-header'Lars Hjemli2007-05-20
|\ \
| * | Teach cgit howto include an external file on index page.Lars Hjemli2007-05-19
| * | Add html_include()Lars Hjemli2007-05-18
| |/
* / Use git-1.5.2Lars Hjemli2007-05-20
|/
* Remove unused extern declarations from cgit.hLars Hjemli2007-05-18
* Add knobs to enable/disable files/lines changed in log viewLars Hjemli2007-05-18
pan>(mode1) || S_ISGITLINK(mode2)); html("<div class='head'>"); html("diff --git a/"); html_txt(path1); html(" b/"); html_txt(path2); if (is_null_sha1(sha1)) path1 = "dev/null"; if (is_null_sha1(sha2)) path2 = "dev/null"; if (mode1 == 0) htmlf("<br/>new file mode %.6o", mode2); if (mode2 == 0) htmlf("<br/>deleted file mode %.6o", mode1); if (!subproject) { abbrev1 = xstrdup(find_unique_abbrev(sha1, DEFAULT_ABBREV)); abbrev2 = xstrdup(find_unique_abbrev(sha2, DEFAULT_ABBREV)); htmlf("<br/>index %s..%s", abbrev1, abbrev2); free(abbrev1); free(abbrev2); if (mode1 != 0 && mode2 != 0) { htmlf(" %.6o", mode1); if (mode2 != mode1) htmlf("..%.6o", mode2); } html("<br/>--- a/"); if (mode1 != 0) cgit_tree_link(path1, NULL, NULL, ctx.qry.head, sha1_to_hex(old_rev_sha1), path1); else html_txt(path1); html("<br/>+++ b/"); if (mode2 != 0) cgit_tree_link(path2, NULL, NULL, ctx.qry.head, sha1_to_hex(new_rev_sha1), path2); else html_txt(path2); } html("</div>"); } static void filepair_cb(struct diff_filepair *pair) { header(pair->one->sha1, pair->one->path, pair->one->mode, pair->two->sha1, pair->two->path, pair->two->mode); if (S_ISGITLINK(pair->one->mode) || S_ISGITLINK(pair->two->mode)) { if (S_ISGITLINK(pair->one->mode)) print_line(fmt("-Subproject %s", sha1_to_hex(pair->one->sha1)), 52); if (S_ISGITLINK(pair->two->mode)) print_line(fmt("+Subproject %s", sha1_to_hex(pair->two->sha1)), 52); return; } if (cgit_diff_files(pair->one->sha1, pair->two->sha1, print_line)) cgit_print_error("Error running diff"); } void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefix) { enum object_type type; unsigned long size; struct commit *commit, *commit2; if (!new_rev) new_rev = ctx.qry.head; get_sha1(new_rev, new_rev_sha1); type = sha1_object_info(new_rev_sha1, &size); if (type == OBJ_BAD) { cgit_print_error(fmt("Bad object name: %s", new_rev)); return; } if (type != OBJ_COMMIT) { cgit_print_error(fmt("Unhandled object type: %s", typename(type))); return; } commit = lookup_commit_reference(new_rev_sha1); if (!commit || parse_commit(commit)) cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(new_rev_sha1))); if (old_rev) get_sha1(old_rev, old_rev_sha1); else if (commit->parents && commit->parents->item) hashcpy(old_rev_sha1, commit->parents->item->object.sha1); else hashclr(old_rev_sha1); if (!is_null_sha1(old_rev_sha1)) { type = sha1_object_info(old_rev_sha1, &size); if (type == OBJ_BAD) { cgit_print_error(fmt("Bad object name: %s", sha1_to_hex(old_rev_sha1))); return; } commit2 = lookup_commit_reference(old_rev_sha1); if (!commit2 || parse_commit(commit2)) cgit_print_error(fmt("Bad commit: %s", sha1_to_hex(old_rev_sha1))); } html("<table summary='diff' class='diff'>"); html("<tr><td>"); cgit_diff_tree(old_rev_sha1, new_rev_sha1, filepair_cb, prefix); html("</td></tr>"); html("</table>"); }