summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-02-24 22:10:35 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-02-24 22:10:35 -0800
commitb9efce10c26550d52f9d417f371984579ef01b22 (patch)
treede06ea27366962c70b56ad5dbdee5342304eff16
parentMerge branch 'jk/status-read-branch-name-fix' into maint (diff)
parentdo not check truth value of flex arrays (diff)
downloadtgif-b9efce10c26550d52f9d417f371984579ef01b22.tar.xz
Merge branch 'jk/remote-curl-an-array-in-struct-cannot-be-null' into maint
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
-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);