From: Junio C Hamano Date: Thu, 17 Jul 2008 00:12:18 +0000 (-0700) Subject: Merge branch 'rs/archive' X-Git-Tag: v1.6.0-rc0~40 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e75bf76f5462af4185d8260f6feecf24dd24a516?ds=inline;hp=-c Merge branch 'rs/archive' * 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 --- e75bf76f5462af4185d8260f6feecf24dd24a516 diff --combined builtin-merge-recursive.c index 3731853f83,385e742eef..652a2c32bb --- a/builtin-merge-recursive.c +++ b/builtin-merge-recursive.c @@@ -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); @@@ -268,7 -276,7 +268,7 @@@ 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;