diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/branch.c | 2 | ||||
-rw-r--r-- | builtin/commit.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index 083689063f..8db095f5c2 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -490,7 +490,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; } diff --git a/builtin/commit.c b/builtin/commit.c index 10acc53f80..89f65f2b82 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -1311,7 +1311,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1, commit = lookup_commit(sha1); if (!commit) die(_("couldn't look up newly created commit")); - if (!commit || parse_commit(commit)) + if (parse_commit(commit)) die(_("could not parse newly created commit")); strbuf_addstr(&format, "format:%h] %s"); @@ -1503,7 +1503,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) current_head = NULL; else { current_head = lookup_commit_or_die(sha1, "HEAD"); - if (!current_head || parse_commit(current_head)) + if (parse_commit(current_head)) die(_("could not parse HEAD commit")); } argc = parse_and_validate_options(argc, argv, builtin_commit_options, |