diff --git a/builtin/blame.c b/builtin/blame.c
index f6b03f7..5b5fc6a 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1413,8 +1413,7 @@ static void get_ac_line(const char *inbuf, const char *what,
}
static void get_commit_info(struct commit *commit,
- struct commit_info *ret,
- int detailed)
+ struct commit_info *ret)
{
int len;
const char *subject;@@ -1447,11 +1446,6 @@ static void get_commit_info(struct commit *commit,
sizeof(author_mail), author_mail,
&ret->author_time, &ret->author_tz);
- if (!detailed) {
- free(reencoded);
- return;
- }
-
ret->committer = committer_name;
ret->committer_mail = committer_mail;
get_ac_line(message, "\ncommitter ",@@ -1493,7 +1487,7 @@ static int emit_one_suspect_detail(struct origin *suspect)
return 0;
suspect->commit->object.flags |= METAINFO_SHOWN;
- get_commit_info(suspect->commit, &ci, 1);
+ get_commit_info(suspect->commit, &ci);
printf("author %s\n", ci.author);
printf("author-mail %s\n", ci.author_mail);
printf("author-time %lu\n", ci.author_time);@@ -1664,7 +1658,7 @@ static void emit_other(struct scoreboard *sb, struct blame_entry *ent, int opt)
char hex[41];
int show_raw_time = !!(opt & OUTPUT_RAW_TIMESTAMP);
- get_commit_info(suspect->commit, &ci, 1);
+ get_commit_info(suspect->commit, &ci);
strcpy(hex, sha1_to_hex(suspect->commit->object.sha1));
cp = nth_line(sb, ent->lno);
@@ -1850,7 +1844,7 @@ static void find_alignment(struct scoreboard *sb, int *option)
longest_file = num;
if (!(suspect->commit->object.flags & METAINFO_SHOWN)) {
suspect->commit->object.flags |= METAINFO_SHOWN;
- get_commit_info(suspect->commit, &ci, 1);
+ get_commit_info(suspect->commit, &ci);
if (*option & OUTPUT_SHOW_EMAIL)
num = utf8_strwidth(ci.author_mail);
elsediff --git a/reflog-walk.c b/reflog-walk.c
index 5d81d39..3357331 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -87,22 +87,12 @@ struct commit_info_lifo {
};
static struct commit_info *get_commit_info(struct commit *commit,
- struct commit_info_lifo *lifo, int pop)
+ struct commit_info_lifo *lifo)
{
int i;
for (i = 0; i < lifo->nr; i++)
- if (lifo->items[i].commit == commit) {
- struct commit_info *result = &lifo->items[i];
- if (pop) {
- if (i + 1 < lifo->nr)
- memmove(lifo->items + i,
- lifo->items + i + 1,
- (lifo->nr - i) *
- sizeof(struct commit_info));
- lifo->nr--;
- }
- return result;
- }
+ if (lifo->items[i].commit == commit)
+ return &lifo->items[i];
return NULL;
}
@@ -214,7 +204,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info,
void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit)
{
struct commit_info *commit_info =
- get_commit_info(commit, &info->reflogs, 0);
+ get_commit_info(commit, &info->reflogs);
struct commit_reflog *commit_reflog;
struct reflog_info *reflog;
--
1.7.4.18.g68fe8