Merge branch 'jk/robustify-parse-commit'
* jk/robustify-parse-commit: checkout: do not die when leaving broken detached HEAD use parse_commit_or_die instead of custom message use parse_commit_or_die instead of segfaulting assume parse_commit checks for NULL commit assume parse_commit checks commit->object.parsed log_tree_diff: die when we fail to parse a commit
This commit is contained in:
@ -502,7 +502,7 @@ static void add_verbose_info(struct strbuf *out, struct ref_item *item,
|
||||
const char *sub = _(" **** invalid ref ****");
|
||||
struct commit *commit = item->commit;
|
||||
|
||||
if (commit && !parse_commit(commit)) {
|
||||
if (!parse_commit(commit)) {
|
||||
pp_commit_easy(CMIT_FMT_ONELINE, commit, &subject);
|
||||
sub = subject.buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user