X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=reflog-walk.c;h=ee1456b45a2e1bfe08564400c12015889e57cf12;hb=f70dda250e33dd17f6fdff17d15287391d8b0952;hp=c983858259f717b3ed9d0f00921aec92219c1ad3;hpb=1b2782a5e2f88bf5e6e2cbb58e54fea015e21af5;p=git.git diff --git a/reflog-walk.c b/reflog-walk.c index c98385825..ee1456b45 100644 --- a/reflog-walk.c +++ b/reflog-walk.c @@ -136,7 +136,7 @@ void init_reflog_walk(struct reflog_walk_info** info) *info = xcalloc(sizeof(struct reflog_walk_info), 1); } -void add_reflog_for_walk(struct reflog_walk_info *info, +int add_reflog_for_walk(struct reflog_walk_info *info, struct commit *commit, const char *name) { unsigned long timestamp = 0; @@ -188,7 +188,7 @@ void add_reflog_for_walk(struct reflog_walk_info *info, } } if (!reflogs || reflogs->nr == 0) - die("No reflogs found for '%s'", branch); + return -1; path_list_insert(branch, &info->complete_reflogs)->util = reflogs; } @@ -200,13 +200,14 @@ void add_reflog_for_walk(struct reflog_walk_info *info, if (commit_reflog->recno < 0) { free(branch); free(commit_reflog); - return; + return -1; } } else commit_reflog->recno = reflogs->nr - recno - 1; commit_reflog->reflogs = reflogs; add_commit_info(commit, commit_reflog, &info->reflogs); + return 0; } void fake_reflog_parent(struct reflog_walk_info *info, struct commit *commit)