refspec: convert valid_fetch_refspec to use parse_refspec
[gitweb.git] / builtin / fast-export.c
index a15898d64177b380ea021e3bc63fb91446bc02b3..6f105dc7985c32a412109adb80cacb40140b74dd 100644 (file)
@@ -7,6 +7,7 @@
 #include "cache.h"
 #include "config.h"
 #include "refs.h"
+#include "refspec.h"
 #include "commit.h"
 #include "object.h"
 #include "tag.h"
@@ -35,7 +36,7 @@ static int use_done_feature;
 static int no_data;
 static int full_tree;
 static struct string_list extra_refs = STRING_LIST_INIT_NODUP;
-static struct refspec *refspecs;
+static struct refspec_item *refspecs;
 static int refspecs_nr;
 static int anonymize;
 
@@ -651,8 +652,11 @@ static void handle_tail(struct object_array *commits, struct rev_info *revs,
        struct commit *commit;
        while (commits->nr) {
                commit = (struct commit *)object_array_pop(commits);
-               if (has_unshown_parent(commit))
+               if (has_unshown_parent(commit)) {
+                       /* Queue again, to be handled later */
+                       add_object_array(&commit->object, NULL, commits);
                        return;
+               }
                handle_commit(commit, revs, paths_of_changed_objects);
        }
 }
@@ -975,7 +979,7 @@ static void handle_deletes(void)
 {
        int i;
        for (i = 0; i < refspecs_nr; i++) {
-               struct refspec *refspec = &refspecs[i];
+               struct refspec_item *refspec = &refspecs[i];
                if (*refspec->src)
                        continue;