]> git.ipfire.org Git - thirdparty/git.git/blobdiff - remote.c
l10n: Fix more typos in the Swedish translations
[thirdparty/git.git] / remote.c
index eea2c8de45052e3e3a59fb150eef3f54c6086800..ae040432037f7463233c5add8257b17ace365b23 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -523,7 +523,7 @@ static void free_refspecs(struct refspec *refspec, int nr_refspec)
 static struct refspec *parse_refspec_internal(int nr_refspec, const char **refspec, int fetch, int verify)
 {
        int i;
-       struct refspec *rs = xcalloc(sizeof(*rs), nr_refspec);
+       struct refspec *rs = xcalloc(nr_refspec, sizeof(*rs));
 
        for (i = 0; i < nr_refspec; i++) {
                size_t llen;
@@ -1194,7 +1194,7 @@ static int match_explicit(struct ref *src, struct ref *dst,
        case 1:
                break;
        case 0:
-               if (!memcmp(dst_value, "refs/", 5))
+               if (starts_with(dst_value, "refs/"))
                        matched_dst = make_linked_ref(dst_value, dst_tail);
                else if (is_null_sha1(matched_src->new_sha1))
                        error("unable to delete '%s': remote ref does not exist",