Code

"needs update" considered harmful
[git.git] / builtin-merge-recursive.c
index 43bf6aa45eeacbb67490c809070f40023ce4e434..652a2c32bb0913108e0435de86392764da3ad611 100644 (file)
@@ -42,14 +42,6 @@ static struct tree *shift_tree_object(struct tree *one, struct tree *two)
  * - *(int *)commit->object.sha1 set to the virtual id.
  */
 
-static unsigned commit_list_count(const struct commit_list *l)
-{
-       unsigned c = 0;
-       for (; l; l = l->next )
-               c++;
-       return c;
-}
-
 static struct commit *make_virtual_commit(struct tree *tree, const char *comment)
 {
        struct commit *commit = xcalloc(1, sizeof(struct commit));
@@ -256,7 +248,7 @@ struct tree *write_tree_from_memory(void)
 
 static int save_files_dirs(const unsigned char *sha1,
                const char *base, int baselen, const char *path,
-               unsigned int mode, int stage)
+               unsigned int mode, int stage, void *context)
 {
        int len = strlen(path);
        char *newpath = xmalloc(baselen + len + 1);
@@ -276,7 +268,7 @@ static int save_files_dirs(const unsigned char *sha1,
 static int get_files_dirs(struct tree *tree)
 {
        int n;
-       if (read_tree_recursive(tree, "", 0, 0, NULL, save_files_dirs) != 0)
+       if (read_tree_recursive(tree, "", 0, 0, NULL, save_files_dirs, NULL))
                return 0;
        n = current_file_set.nr + current_directory_set.nr;
        return n;