aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/shortlog.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/shortlog.c')
-rw-r--r--builtin/shortlog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 30075b67be..60adc5e7a5 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -187,7 +187,7 @@ static void insert_records_from_trailers(struct shortlog *log,
ctx->output_encoding);
body = strstr(commit_buffer, "\n\n");
if (!body)
- return;
+ goto out;
trailer_iterator_init(&iter, body);
while (trailer_iterator_advance(&iter)) {
@@ -206,6 +206,7 @@ static void insert_records_from_trailers(struct shortlog *log,
}
trailer_iterator_release(&iter);
+out:
strbuf_release(&ident);
repo_unuse_commit_buffer(the_repository, commit, commit_buffer);
}
@@ -418,7 +419,7 @@ int cmd_shortlog(int argc,
* git/nongit so that we do not have to do this.
*/
if (nongit && !the_hash_algo)
- repo_set_hash_algo(the_repository, GIT_HASH_SHA1);
+ repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
git_config(git_default_config, NULL);
shortlog_init(&log);