diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-06 14:57:57 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-06 14:57:57 -0800 |
commit | f56a5f4fed296647ae8978645f9c627410717398 (patch) | |
tree | 693afac09ae1fd40b7ab39ae8b8122cde6050b7f /connect.c | |
parent | d86679fa061e22e33596814630513b6a7b4d4767 (diff) | |
parent | 2ce63e9fac242a70cd6d9e1325063bbb2e5091f8 (diff) | |
download | git-f56a5f4fed296647ae8978645f9c627410717398.tar.gz |
Merge branch 'rs/simple-cleanups' into maint
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; } |