@@ -115,6 +115,7 @@ static int write_archive_entry(const unsigned char *sha1, const char *base,
115
115
116
116
strbuf_reset (& path );
117
117
strbuf_grow (& path , PATH_MAX );
118
+ strbuf_add (& path , args -> base , args -> baselen );
118
119
strbuf_add (& path , base , baselen );
119
120
strbuf_addstr (& path , filename );
120
121
path_without_prefix = path .buf + args -> baselen ;
@@ -187,8 +188,8 @@ int write_archive_entries(struct archiver_args *args,
187
188
git_attr_set_direction (GIT_ATTR_INDEX , & the_index );
188
189
}
189
190
190
- err = read_tree_recursive (args -> tree , args -> base , args -> baselen , 0 ,
191
- args -> pathspec , write_archive_entry , & context );
191
+ err = read_tree_recursive (args -> tree , "" , 0 , 0 , args -> pathspec ,
192
+ write_archive_entry , & context );
192
193
if (err == READ_TREE_RECURSIVE )
193
194
err = 0 ;
194
195
return err ;
@@ -211,7 +212,7 @@ static const struct archiver *lookup_archiver(const char *name)
211
212
static void parse_pathspec_arg (const char * * pathspec ,
212
213
struct archiver_args * ar_args )
213
214
{
214
- ar_args -> pathspec = get_pathspec (ar_args -> base , pathspec );
215
+ ar_args -> pathspec = get_pathspec ("" , pathspec );
215
216
}
216
217
217
218
static void parse_treeish_arg (const char * * argv ,
0 commit comments