diff options
author | René Scharfe <l.s.r@web.de> | 2017-03-17 23:12:31 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-18 10:14:07 -0700 |
commit | e94eac49e6edb1ef37796e11bf52a7cb301645e8 (patch) | |
tree | e12d0a8766594c90a8c828ceda23c793ca0e7a73 | |
parent | c3808ca6982b0ad7ee9b87eca9b50b9a24ec08b0 (diff) | |
download | git-e94eac49e6edb1ef37796e11bf52a7cb301645e8.tar.gz |
http-push: don't check return value of lookup_unknown_object()rs/http-push-cleanup
This function always returns a reference to an object, creating one if
needed, so remove the unnecessary NULL check.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | http-push.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/http-push.c b/http-push.c index 704b1c837c..f0e3108f71 100644 --- a/http-push.c +++ b/http-push.c @@ -1431,11 +1431,9 @@ static void one_remote_ref(const char *refname) */ if (repo->can_update_info_refs && !has_object_file(&ref->old_oid)) { obj = lookup_unknown_object(ref->old_oid.hash); - if (obj) { - fprintf(stderr, " fetch %s for %s\n", - oid_to_hex(&ref->old_oid), refname); - add_fetch_request(obj); - } + fprintf(stderr, " fetch %s for %s\n", + oid_to_hex(&ref->old_oid), refname); + add_fetch_request(obj); } ref->next = remote_refs; |