diff --git a/fsck.c b/fsck.c index 3d05d4a794..c17a538def 100644 --- a/fsck.c +++ b/fsck.c @@ -350,7 +350,7 @@ int fsck_error_function(struct object *obj, int type, const char *fmt, ...) int len; struct strbuf sb = STRBUF_INIT; - strbuf_addf(&sb, "object %s:", obj->sha1?sha1_to_hex(obj->sha1):"(null)"); + strbuf_addf(&sb, "object %s:", sha1_to_hex(obj->sha1)); va_start(ap, fmt); len = vsnprintf(sb.buf + sb.len, strbuf_avail(&sb), fmt, ap); diff --git a/transport.c b/transport.c index 0078660611..26d4e5234a 100644 --- a/transport.c +++ b/transport.c @@ -156,7 +156,7 @@ static void set_upstreams(struct transport *transport, struct ref *refs, continue; if (!ref->peer_ref) continue; - if (!ref->new_sha1 || is_null_sha1(ref->new_sha1)) + if (is_null_sha1(ref->new_sha1)) continue; /* Follow symbolic refs (mainly for HEAD). */