]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pretty.c
i18n: avoid parenthesized string as array initializer
[thirdparty/git.git] / pretty.c
index 0e167f463f864ca5516d2d5cf7df8595226090d7..e1d8a8f414bf052a59fbe78d022e611f44ed8361 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -228,7 +228,7 @@ static void add_rfc2047(struct strbuf *sb, const char *line, int len,
 
        for (i = 0; i < len; i++) {
                int ch = line[i];
-               if (non_ascii(ch))
+               if (non_ascii(ch) || ch == '\n')
                        goto needquote;
                if ((i + 1 < len) && (ch == '=' && line[i+1] == '?'))
                        goto needquote;
@@ -254,7 +254,7 @@ needquote:
                 * many programs do not understand this and just
                 * leave the underscore in place.
                 */
-               if (is_rfc2047_special(ch) || ch == ' ') {
+               if (is_rfc2047_special(ch) || ch == ' ' || ch == '\n') {
                        strbuf_addf(sb, "=%02X", ch);
                        line_len += 3;
                }
@@ -876,11 +876,7 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
                                              c->abbrev_parent_hashes.off;
                return 1;
        case 'm':               /* left/right/bottom */
-               strbuf_addch(sb, (commit->object.flags & BOUNDARY)
-                                ? '-'
-                                : (commit->object.flags & SYMMETRIC_LEFT)
-                                ? '<'
-                                : '>');
+               strbuf_addstr(sb, get_revision_mark(NULL, commit));
                return 1;
        case 'd':
                format_decoration(sb, commit);