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
This commit is contained in:
@ -248,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);
|
||||
@ -268,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;
|
||||
|
||||
Reference in New Issue
Block a user