]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-log.c
ui-log: replace get_sha1() with get_oid()
[cgit.git] / ui-log.c
index d6d94f658391e57cdc11da36c7a0f7902d8716e1..6cc81a3b1dce99fee225603b9991b738ffd97e73 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -49,7 +49,7 @@ static void inspect_files(struct diff_filepair *pair)
 
        files++;
        if (ctx.repo->enable_log_linecount)
-               cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size,
+               cgit_diff_files(&pair->one->oid, &pair->two->oid, &old_size,
                                &new_size, &binary, 0, ctx.qry.ignorews,
                                count_lines);
 }
@@ -258,7 +258,8 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
        if (ctx.repo->enable_log_filecount)
                htmlf("</td><td>%d", files);
        if (ctx.repo->enable_log_linecount)
-               htmlf("</td><td>-%d/+%d", rem_lines, add_lines);
+               htmlf("</td><td><span class='deletions'>-%d</span>/"
+                       "<span class='insertions'>+%d</span>", rem_lines, add_lines);
 
        html("</td></tr>\n");
 
@@ -324,7 +325,7 @@ static const char *disambiguate_ref(const char *ref, int *must_free_result)
        struct strbuf longref = STRBUF_INIT;
 
        strbuf_addf(&longref, "refs/heads/%s", ref);
-       if (get_sha1(longref.buf, oid.hash) == 0) {
+       if (get_oid(longref.buf, &oid) == 0) {
                *must_free_result = 1;
                return strbuf_detach(&longref, NULL);
        }