summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--file/git-hist.c6
-rw-r--r--file/git-hist.h2
-rw-r--r--gui/history.c4
-rw-r--r--gui/sheet.c2
4 files changed, 8 insertions, 6 deletions
diff --git a/file/git-hist.c b/file/git-hist.c
index 237fd19..93fe69f 100644
--- a/file/git-hist.c
+++ b/file/git-hist.c
@@ -379,7 +379,7 @@ static char *append(char *s, char *add)
*/
char *vcs_git_long_for_pango(const struct vcs_hist *h,
- char *(*formatter)(const char *fmt, ...))
+ char *(*formatter)(const char *fmt, ...), bool full)
{
git_buf buf = { 0 };
const git_signature *sig;
@@ -397,9 +397,11 @@ char *vcs_git_long_for_pango(const struct vcs_hist *h,
"%s<span background=\"#00e00080\"><b> %s </b></span>",
i ? " " : "", h->branches[i]));
s = append(s, formatter(
- "%s<b>%s</b> %s%s &lt;%s&gt;<small>\n%s</small>",
+ "%s<b>%s</b> %s%s &lt;%s&gt;<small>\n%s%s</small>",
h->n_branches ? "\n" : "",
buf.ptr, ctime(&sig->when.time), sig->name, sig->email,
+ full ? "\n" : "",
+ full ? git_commit_message(h->commit) :
git_commit_summary(h->commit)));
git_buf_free(&buf);
return s;
diff --git a/file/git-hist.h b/file/git-hist.h
index 908b2d6..da865a9 100644
--- a/file/git-hist.h
+++ b/file/git-hist.h
@@ -60,7 +60,7 @@ const char *vcs_git_summary(const struct vcs_hist *hist);
char *vcs_git_summary_for_pango(const struct vcs_hist *hist,
char *(*formatter)(const char *fmt, ...));
char *vcs_git_long_for_pango(const struct vcs_hist *hist,
- char *(*formatter)(const char *fmt, ...));
+ char *(*formatter)(const char *fmt, ...), bool full);
unsigned threads_number(const struct vcs_history *history);
enum thread *threads_classify(const struct vcs_history *history,
diff --git a/gui/history.c b/gui/history.c
index e4f6a81..f2862df 100644
--- a/gui/history.c
+++ b/gui/history.c
@@ -55,7 +55,7 @@ void commit_hover(struct gui *gui, const struct vcs_hist *vcs_hist)
gui->commit_hover = vcs_hist;
/* should only update if visible */
if (view && vcs_hist) {
- s = vcs_git_long_for_pango(vcs_hist, fmt_pango);
+ s = vcs_git_long_for_pango(vcs_hist, fmt_pango, 1);
view_update(view, s, 1);
free(s);
}
@@ -297,7 +297,7 @@ static bool hover_history(void *user, bool on, int dx, int dy)
overlay_size(h->over, gtk_widget_get_pango_context(gui->da),
NULL, &before);
if (on) {
- s = vcs_git_long_for_pango(h->vcs_hist, fmt_pango);
+ s = vcs_git_long_for_pango(h->vcs_hist, fmt_pango, 0);
commit_hover(gui, h->vcs_hist);
} else {
s = vcs_git_summary_for_pango(h->vcs_hist, fmt_pango);
diff --git a/gui/sheet.c b/gui/sheet.c
index 98e22be..3e83dfe 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -153,7 +153,7 @@ static bool show_history_details(void *user, bool on, int dx, int dy)
char *s;
if (on) {
- s = vcs_git_long_for_pango(h->vcs_hist, fmt_pango);
+ s = vcs_git_long_for_pango(h->vcs_hist, fmt_pango, 0);
overlay_text_raw(h->over, s);
commit_hover(gui, h->vcs_hist);
free(s);