summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5743350)
raw | patch | inline | side by side (parent: 5743350)
author | Jim Meyering <jim@meyering.net> | |
Thu, 26 May 2011 13:58:16 +0000 (15:58 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 May 2011 18:24:24 +0000 (11:24 -0700) |
* fsck.c (fsck_error_function): Don't test obj->sha1 == 0.
It can never be true, since that sha1 member is an array.
* transport.c (set_upstreams): Likewise for ref->new_sha1.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It can never be true, since that sha1 member is an array.
* transport.c (set_upstreams): Likewise for ref->new_sha1.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsck.c | patch | blob | history | |
transport.c | patch | blob | history |
index 3d05d4a794a4158a421ce1265422d241e28a5278..c17a538def23c85e6015f07dc446ff4fb9fda352 100644 (file)
--- a/fsck.c
+++ b/fsck.c
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 00786606117feea4b33b7e632b8ff8a3c26de4e4..26d4e5234a8404e005ef2298a86d4f9e5d83a7ae 100644 (file)
--- a/transport.c
+++ b/transport.c
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). */