summaryrefslogtreecommitdiffstats
path: root/connect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-05 21:45:42 +0100
committerJunio C Hamano <gitster@pobox.com>2015-03-05 21:45:42 +0100
commit8a6444d50ea73350ae7e6083ecc63393749e5bb0 (patch)
tree949f413a7105dc06326fc3fc5108ebff92397f57 /connect.c
parentMerge branch 'rj/no-xopen-source-for-cygwin' (diff)
parentsha1_name: use strlcpy() to copy strings (diff)
downloadgit-8a6444d50ea73350ae7e6083ecc63393749e5bb0.tar.xz
git-8a6444d50ea73350ae7e6083ecc63393749e5bb0.zip
Merge branch 'rs/simple-cleanups'
Code cleanups. * rs/simple-cleanups: sha1_name: use strlcpy() to copy strings pretty: use starts_with() to check for a prefix for-each-ref: use skip_prefix() to avoid duplicate string comparison connect: use strcmp() for string comparison
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/connect.c b/connect.c
index 372ac5ad9d..d50f52ad8b 100644
--- a/connect.c
+++ b/connect.c
@@ -157,8 +157,7 @@ struct ref **get_remote_heads(int in, char *src_buf, size_t src_len,
server_capabilities = xstrdup(name + name_len + 1);
}
- if (extra_have &&
- name_len == 5 && !memcmp(".have", name, 5)) {
+ if (extra_have && !strcmp(name, ".have")) {
sha1_array_append(extra_have, old_sha1);
continue;
}