Merge branch 'sb/t5531-update-desc' into maint
[gitweb.git] / builtin / blame.c
index f7aa95f4babaab904443784eccdaa3b219bd2b08..ca9ebe40e7d4dac16a7b325e18857e9f1bfb316c 100644 (file)
@@ -1890,7 +1890,7 @@ static void emit_porcelain(struct scoreboard *sb, struct blame_entry *ent,
        int cnt;
        const char *cp;
        struct origin *suspect = ent->suspect;
-       char hex[GIT_SHA1_HEXSZ + 1];
+       char hex[GIT_MAX_HEXSZ + 1];
 
        oid_to_hex_r(hex, &suspect->commit->object.oid);
        printf("%s %d %d %d\n",
@@ -1928,7 +1928,7 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
        const char *cp;
        struct origin *suspect = ent->suspect;
        struct commit_info ci;
-       char hex[GIT_SHA1_HEXSZ + 1];
+       char hex[GIT_MAX_HEXSZ + 1];
        int show_raw_time = !!(opt & OUTPUT_RAW_TIMESTAMP);
 
        get_commit_info(suspect->commit, &ci, 1);
@@ -2688,12 +2688,15 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
                blame_date_width = sizeof("2006-10-19");
                break;
        case DATE_RELATIVE:
-               /* TRANSLATORS: This string is used to tell us the maximum
-                  display width for a relative timestamp in "git blame"
-                  output.  For C locale, "4 years, 11 months ago", which
-                  takes 22 places, is the longest among various forms of
-                  relative timestamps, but your language may need more or
-                  fewer display columns. */
+               /*
+                * TRANSLATORS: This string is used to tell us the
+                * maximum display width for a relative timestamp in
+                * "git blame" output.  For C locale, "4 years, 11
+                * months ago", which takes 22 places, is the longest
+                * among various forms of relative timestamps, but
+                * your language may need more or fewer display
+                * columns.
+                */
                blame_date_width = utf8_strwidth(_("4 years, 11 months ago")) + 1; /* add the null */
                break;
        case DATE_NORMAL: