]> git.ipfire.org Git - thirdparty/git.git/blobdiff - log-tree.c
Merge branch 'en/ort-perf-batch-9'
[thirdparty/git.git] / log-tree.c
index 4531cebfab38c047fcdffb3ac0acaec747f688f1..f3178a66a95bb15915eaca9713dc442dd7397984 100644 (file)
@@ -369,8 +369,14 @@ void fmt_output_subject(struct strbuf *filename,
        int start_len = filename->len;
        int max_len = start_len + info->patch_name_max - (strlen(suffix) + 1);
 
-       if (0 < info->reroll_count)
-               strbuf_addf(filename, "v%d-", info->reroll_count);
+       if (info->reroll_count) {
+               struct strbuf temp = STRBUF_INIT;
+
+               strbuf_addf(&temp, "v%s", info->reroll_count);
+               format_sanitized_subject(filename, temp.buf, temp.len);
+               strbuf_addstr(filename, "-");
+               strbuf_release(&temp);
+       }
        strbuf_addf(filename, "%04d-%s", nr, subject);
 
        if (max_len < filename->len)