diff options
1 files changed, 13 insertions, 0 deletions
| -rw-r--r-- | ui-log.c | 13 |
@@ -187,6 +187,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) int columns = revs->graph ? 4 : 3; struct strbuf graphbuf = STRBUF_INIT; struct strbuf msgbuf = STRBUF_INIT; + char *detail; struct signature_check signature_check; memset(&signature_check, 0, sizeof(signature_check)); @@ -195,6 +196,9 @@ static void print_commit(struct commit *commit, struct rev_info *revs) if (ctx.repo->enable_log_linecount) columns++; + /* SHA */ + columns++; + if (revs->graph) { /* Advance graph until current commit */ while (!graph_next_line(revs->graph, &graphbuf)) { @@ -295,6 +299,13 @@ static void print_commit(struct commit *commit, struct rev_info *revs) htmlf("</td><td><span class='deletions'>-%d</span>/" "<span class='insertions'>+%d</span>", rem_lines, add_lines); + /* Should repo_find_unique_abbrev_r be used instead? */ + detail = oid_to_hex(&commit->object.oid); + html("</td><td title='"); + html_txtf("%s", detail); + html("'>"); + html_txtf("%.7s", detail); + html("</td></tr>\n"); if ((revs->graph && !graph_is_commit_finished(revs->graph)) @@ -511,6 +522,8 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern html("<th class='left'>Lines</th>"); columns++; } + html("<th class='left'>SHA</th>"); + columns++; html("</tr>\n"); if (ofs<0) |
