t4201: make use of abbreviation in the test more robust
[gitweb.git] / builtin / fetch-pack.c
index cfe9e447c27469407ab439bacb540a4d0b68d4b4..2a1c1c213f4092a274c562324c4d1820c58a6be2 100644 (file)
@@ -219,12 +219,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
         * remote no-such-ref' would silently succeed without issuing
         * an error.
         */
-       for (i = 0; i < nr_sought; i++) {
-               if (!sought[i] || sought[i]->matched)
-                       continue;
-               error("no such remote ref %s", sought[i]->name);
-               ret = 1;
-       }
+       ret |= report_unmatched_refs(sought, nr_sought);
 
        while (ref) {
                printf("%s %s\n",