tree-diff: rework diff_tree() to generate diffs for multiparent cases as well
[gitweb.git] / shallow.c
index c766fc30122e07bfb3da937b9ae9effcf1133206..bbc98b55c07969474b0afb01d9c4da70455f1903 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -99,8 +99,7 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth,
                                cur_depth = *(int *)commit->util;
                        }
                }
-               if (parse_commit(commit))
-                       die("invalid commit");
+               parse_commit_or_die(commit);
                cur_depth++;
                if ((depth != INFINITE_DEPTH && cur_depth >= depth) ||
                    (is_repository_shallow() && !commit->parents &&
@@ -359,22 +358,6 @@ void remove_nonexistent_theirs_shallow(struct shallow_info *info)
        info->nr_theirs = dst;
 }
 
-/* Step 5, remove non-existent ones in "ours" in the pack */
-void remove_nonexistent_ours_in_pack(struct shallow_info *info,
-                                    struct packed_git *p)
-{
-       unsigned char (*sha1)[20] = info->shallow->sha1;
-       int i, dst;
-       trace_printf_key(TRACE_KEY, "shallow: remove_nonexistent_ours_in_pack\n");
-       for (i = dst = 0; i < info->nr_ours; i++) {
-               if (i != dst)
-                       info->ours[dst] = info->ours[i];
-               if (find_pack_entry_one(sha1[info->ours[i]], p))
-                       dst++;
-       }
-       info->nr_ours = dst;
-}
-
 define_commit_slab(ref_bitmap, uint32_t *);
 
 struct paint_info {