gitweb.cgi: Show "raw" head of project link even when $hash is not defined
[gitweb.git] / log-tree.c
index 9d8d46fa0038202bd49dee9cf5d1a60f781e5d7d..3a6c84dab559cc0904ba6c339fdb97edba7e7983 100644 (file)
@@ -129,7 +129,8 @@ void show_log(struct rev_info *opt, const char *sep)
                        opt->diffopt.stat_sep = buffer;
                }
        } else {
-               printf("%s%s",
+               printf("%s%s%s",
+                      diff_get_color(opt->diffopt.color_diff, DIFF_COMMIT),
                       opt->commit_format == CMIT_FMT_ONELINE ? "" : "commit ",
                       diff_unique_abbrev(commit->object.sha1, abbrev_commit));
                if (opt->parents)
@@ -138,6 +139,8 @@ void show_log(struct rev_info *opt, const char *sep)
                        printf(" (from %s)",
                               diff_unique_abbrev(parent->object.sha1,
                                                  abbrev_commit));
+               printf("%s",
+                      diff_get_color(opt->diffopt.color_diff, DIFF_RESET));
                putchar(opt->commit_format == CMIT_FMT_ONELINE ? ' ' : '\n');
        }