summaryrefslogtreecommitdiff
path: root/builtin/branch.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-10-24 08:53:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-10-24 22:43:50 (GMT)
commit5e7d4d3e932432131d0f8f4195e0061ecf644865 (patch)
tree69826f91be44e4096551bc75e884f0f1db7d8db5 /builtin/branch.c
parent0064053bd76ba385e1b5d51b6175bc17bc507804 (diff)
downloadgit-5e7d4d3e932432131d0f8f4195e0061ecf644865.zip
git-5e7d4d3e932432131d0f8f4195e0061ecf644865.tar.gz
git-5e7d4d3e932432131d0f8f4195e0061ecf644865.tar.bz2
assume parse_commit checks for NULL commit
The parse_commit function will check whether it was passed a NULL commit pointer, and if so, return an error. There is no need for callers to check this separately. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/branch.c')
-rw-r--r--builtin/branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 0836890..8db095f 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;
}