Merge branch 'rs/archive'
authorJunio C Hamano <gitster@pobox.com>
Thu, 17 Jul 2008 00:12:18 +0000 (17:12 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Jul 2008 00:12:18 +0000 (17:12 -0700)
* rs/archive:
archive: remove extra arguments parsing code
archive: unify file attribute handling
archive: centralize archive entry writing
archive: add baselen member to struct archiver_args
add context pointer to read_tree_recursive()
archive: remove args member from struct archiver

1  2 
builtin-merge-recursive.c
index 3731853f83be37d3790a5db8ef037af0b0a4f7c5,385e742eefb6f62b58705dfb98a977bdc76ea4d2..652a2c32bb0913108e0435de86392764da3ad611
@@@ -42,6 -42,14 +42,6 @@@ static struct tree *shift_tree_object(s
   * - *(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));
@@@ -248,7 -256,7 +248,7 @@@ struct tree *write_tree_from_memory(voi
  
  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);
  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;