Merge branch 'jk/close-stderr-of-credential-cache-deamon'
[gitweb.git] / walker.c
index b929dcc6c043cc69b07846c16fb8aeb021aa3ae3..f8d370913a8dcfb87d62ab994b4823dc84157f8b 100644 (file)
--- a/walker.c
+++ b/walker.c
@@ -205,7 +205,7 @@ static int mark_complete(const char *path, const unsigned char *sha1, int flag,
        struct commit *commit = lookup_commit_reference_gently(sha1, 1);
        if (commit) {
                commit->object.flags |= COMPLETE;
-               commit_list_insert_by_date(commit, &complete);
+               commit_list_insert(commit, &complete);
        }
        return 0;
 }
@@ -267,8 +267,11 @@ int walker_fetch(struct walker *walker, int targets, char **target,
                        goto done;
                }
        }
-       if (!walker->get_recover)
+
+       if (!walker->get_recover) {
                for_each_ref(mark_complete, NULL);
+               commit_list_sort_by_date(&complete);
+       }
 
        for (i = 0; i < targets; i++) {
                if (interpret_target(walker, target[i], &sha1[20 * i])) {