{"thread":{"id":"63863","subject":"[PATCH] blame: remove parameter detailed in get_commit_info()","startedAt":"2025-07-28T03:25:23Z","lastAt":"2025-07-28T03:25:23Z","messageCount":1,"participants":["Han Young"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"522840","messageId":"20250728032515.74742-1-hanyang.tony@bytedance.com","threadId":"63863","inReplyTo":null,"subject":"[PATCH] blame: remove parameter detailed in get_commit_info()","fromName":"Han Young","fromEmail":"hanyang.tony@bytedance.com","sentAt":"2025-07-28T03:25:15Z","receivedAt":"2025-07-28T03:25:23Z","isPatch":true,"sender":{"key":"hanyang.tony@bytedance.com","avatar":"https://avatars.githubusercontent.com/u/108711387?v=4"},"body":"Signed-off-by: Han Young <hanyang.tony@bytedance.com>\n---\n builtin/blame.c | 15 ++++-----------\n 1 file changed, 4 insertions(+), 11 deletions(-)\n\ndiff --git a/builtin/blame.c b/builtin/blame.c\nindex 91586e685..dc934abef 100644\n--- a/builtin/blame.c\n+++ b/builtin/blame.c\n@@ -197,9 +197,7 @@ static void commit_info_destroy(struct commit_info *ci)\n \tstrbuf_release(&ci->summary);\n }\n \n-static void get_commit_info(struct commit *commit,\n-\t\t\t    struct commit_info *ret,\n-\t\t\t    int detailed)\n+static void get_commit_info(struct commit *commit, struct commit_info *ret)\n {\n \tint len;\n \tconst char *subject, *encoding;\n@@ -211,11 +209,6 @@ static void get_commit_info(struct commit *commit,\n \t\t    &ret->author, &ret->author_mail,\n \t\t    &ret->author_time, &ret->author_tz);\n \n-\tif (!detailed) {\n-\t\trepo_unuse_commit_buffer(the_repository, commit, message);\n-\t\treturn;\n-\t}\n-\n \tget_ac_line(message, \"\\ncommitter \",\n \t\t    &ret->committer, &ret->committer_mail,\n \t\t    &ret->committer_time, &ret->committer_tz);\n@@ -263,7 +256,7 @@ static int emit_one_suspect_detail(struct blame_origin *suspect, int repeat)\n \t\treturn 0;\n \n \tsuspect->commit->object.flags |= METAINFO_SHOWN;\n-\tget_commit_info(suspect->commit, &ci, 1);\n+\tget_commit_info(suspect->commit, &ci);\n \tprintf(\"author %s\\n\", ci.author.buf);\n \tprintf(\"author-mail %s\\n\", ci.author_mail.buf);\n \tprintf(\"author-time %\"PRItime\"\\n\", ci.author_time);\n@@ -471,7 +464,7 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int\n \tint show_raw_time = !!(opt & OUTPUT_RAW_TIMESTAMP);\n \tconst char *default_color = NULL, *color = NULL, *reset = NULL;\n \n-\tget_commit_info(suspect->commit, &ci, 1);\n+\tget_commit_info(suspect->commit, &ci);\n \toid_to_hex_r(hex, &suspect->commit->object.oid);\n \n \tcp = blame_nth_line(sb, ent->lno);\n@@ -665,7 +658,7 @@ static void find_alignment(struct blame_scoreboard *sb, int *option)\n \t\tif (!(suspect->commit->object.flags & METAINFO_SHOWN)) {\n \t\t\tstruct commit_info ci = COMMIT_INFO_INIT;\n \t\t\tsuspect->commit->object.flags |= METAINFO_SHOWN;\n-\t\t\tget_commit_info(suspect->commit, &ci, 1);\n+\t\t\tget_commit_info(suspect->commit, &ci);\n \t\t\tif (*option & OUTPUT_SHOW_EMAIL)\n \t\t\t\tnum = utf8_strwidth(ci.author_mail.buf);\n \t\t\telse\n-- \n2.50.0\n\n"}]}