summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-02-17 10:15:27 -0800
committerJunio C Hamano <gitster@pobox.com>2015-02-17 10:15:27 -0800
commitf6b50a8bf4dcc0e0e67698d365640904ac8522b3 (patch)
treec1766efff439ce4f48a62bf5b3ac5ce5dd949bfb /remote-curl.c
parentec8618a7f85fe3fa6da8afda90658f36fc9a1b21 (diff)
parent94ee8e2c98cf4adf0c69b3b8ce5039eea92347b7 (diff)
downloadgit-f6b50a8bf4dcc0e0e67698d365640904ac8522b3.tar.gz
Merge branch 'jk/remote-curl-an-array-in-struct-cannot-be-null'
Fix a misspelled conditional that is always true. * jk/remote-curl-an-array-in-struct-cannot-be-null: do not check truth value of flex arrays
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote-curl.c b/remote-curl.c
index dd63bc27ab..515ac9b411 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -760,7 +760,7 @@ static int fetch_git(struct discovery *heads,
for (i = 0; i < nr_heads; i++) {
struct ref *ref = to_fetch[i];
- if (!ref->name || !*ref->name)
+ if (!*ref->name)
die("cannot fetch by sha1 over smart http");
packet_buf_write(&preamble, "%s %s\n",
sha1_to_hex(ref->old_sha1), ref->name);