summaryrefslogtreecommitdiff
path: root/ui-commit.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2010-06-22 16:15:48 +0200
committerLars Hjemli <hjemli@gmail.com>2010-06-22 16:15:48 +0200
commit37a24e4e39737edaa5cdde501346a65eeb280e63 (patch)
treeff23eb0d57edf108edd1aa3e64a8d6cf70062954 /ui-commit.c
parent47187b33be1c3de43fbed6f350ab05bc978aacd0 (diff)
parenta2cbd3c30b64a26b52b2003ba6569f3c083f4092 (diff)
downloadcgit-37a24e4e39737edaa5cdde501346a65eeb280e63.tar.gz
cgit-37a24e4e39737edaa5cdde501346a65eeb280e63.tar.bz2
cgit-37a24e4e39737edaa5cdde501346a65eeb280e63.zip
Merge branch 'jh/path-limit'
Conflicts: cgit.h ui-commit.c
Diffstat (limited to 'ui-commit.c')
-rw-r--r--ui-commit.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/ui-commit.c b/ui-commit.c
index 41313b9..a11bc5f 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -12,7 +12,7 @@
#include "ui-diff.h"
#include "ui-log.h"
-void cgit_print_commit(char *hex)
+void cgit_print_commit(char *hex, const char *prefix)
{
struct commit *commit, *parent;
struct commitinfo *info, *parent_info;
@@ -58,19 +58,23 @@ void cgit_print_commit(char *hex)
html("</td></tr>\n");
html("<tr><th>commit</th><td colspan='2' class='sha1'>");
tmp = sha1_to_hex(commit->object.sha1);
- cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, 0);
+ cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix, 0);
html(" (");
- cgit_patch_link("patch", NULL, NULL, NULL, tmp);
+ cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix);
html(") (");
if ((ctx.qry.ssdiff && !ctx.cfg.ssdiff) || (!ctx.qry.ssdiff && ctx.cfg.ssdiff))
- cgit_commit_link("unidiff", NULL, NULL, ctx.qry.head, tmp, 1);
+ cgit_commit_link("unidiff", NULL, NULL, ctx.qry.head, tmp, prefix, 1);
else
- cgit_commit_link("side-by-side diff", NULL, NULL, ctx.qry.head, tmp, 1);
+ cgit_commit_link("side-by-side diff", NULL, NULL, ctx.qry.head, tmp, prefix, 1);
html(")</td></tr>\n");
html("<tr><th>tree</th><td colspan='2' class='sha1'>");
tmp = xstrdup(hex);
cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL,
ctx.qry.head, tmp, NULL);
+ if (prefix) {
+ html(" /");
+ cgit_tree_link(prefix, NULL, NULL, ctx.qry.head, tmp, prefix);
+ }
html("</td></tr>\n");
for (p = commit->parents; p ; p = p->next) {
parent = lookup_commit_reference(p->item->object.sha1);
@@ -87,10 +91,10 @@ void cgit_print_commit(char *hex)
parent_info = cgit_parse_commit(parent);
tmp2 = parent_info->subject;
}
- cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, 0);
+ cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix, 0);
html(" (");
cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex,
- sha1_to_hex(p->item->object.sha1), NULL, 0);
+ sha1_to_hex(p->item->object.sha1), prefix, 0);
html(")</td></tr>");
parents++;
}
@@ -121,7 +125,7 @@ void cgit_print_commit(char *hex)
tmp = sha1_to_hex(commit->parents->item->object.sha1);
else
tmp = NULL;
- cgit_print_diff(ctx.qry.sha1, tmp, NULL);
+ cgit_print_diff(ctx.qry.sha1, tmp, prefix);
}
cgit_free_commitinfo(info);
}
urking dbus-monitor processesRené 'Necoro' Neumann1-2/+8 2013-12-03Again one more webfont.René 'Necoro' Neumann1-0/+9 2013-12-03zsh: Make up-/down- to only use local history and Ctrl-R/-S to use globalRené 'Necoro' Neumann1-1/+13 history. 2013-12-02One more new webfontRené 'Necoro' Neumann1-0/+9 2013-11-21IE: Remove isub/isup: they are not supported anymoreRené 'Necoro' Neumann1-1/+1 2013-11-21IE/IJ: Session logicRené 'Necoro' Neumann1-2/+15 2013-11-06Colorscheme for virtual console.René 'Necoro' Neumann1-1/+5 2013-11-01Do not try to set window title and stuff in linux consoleRené 'Necoro' Neumann1-0/+3 2013-10-30Set terminal title not only on path change, but for each new prompt.René 'Necoro' Neumann1-2/+2 2013-10-22cwd-spawn: Use M-Return instead of M-o for consistency.René 'Necoro' Neumann1-2/+2 2013-10-22Add cwd-spawn to urxvt to allow spawning a new terminal from the currentRené 'Necoro' Neumann3-2/+199 working dir. 2013-10-22Use chpwd_functions and precmd_functions instead of putting everything inRené 'Necoro' Neumann1-19/+23 precmd(). 2013-09-30urxvt: execute the wgetpaste check each timeRené 'Necoro' Neumann1-2/+5 2013-09-30urxvt: wgetpaste fixRené 'Necoro' Neumann1-4/+4 2013-09-30Allow HOME variable in .Xresources.René 'Necoro' Neumann2-3/+3 2013-09-30wgetpaste support for urxvt.René 'Necoro' Neumann2-1/+28 2013-09-30Urxvt autotransform for <filename>:<line>.René 'Necoro' Neumann1-1/+4 2013-09-30Remove tabbed(x) from urxvt. We use i3 -- no need for it.René 'Necoro' Neumann1-9/+0 2013-09-30Do not display icon in urxvt. It's not supported by i3 anyway.René 'Necoro' Neumann1-1/+1 2013-09-29Remove wrong monitors lineRené 'Necoro' Neumann1-1/+0 2013-09-29Delete vimperator paste plugin -- seems not to work anymore with new FFRené 'Necoro' Neumann1-266/+0 versions. And it wasn't used anyway. 2013-09-29Use $HOST instead of Cauchiy in titleRené 'Necoro' Neumann1-1/+1 2013-09-24Remove herbstluftwmRené 'Necoro' Neumann1-1/+0 2013-09-24Conky changesRené 'Necoro' Neumann2-5/+13 2013-09-15Remove trailing slash from \~ulpRené 'Necoro' Neumann1-1/+1 2013-09-15Make cci explicitly use python2René 'Necoro' Neumann1-1/+1 2013-09-10Node/NPM preparationRené 'Necoro' Neumann3-1/+13