@@ -115,6 +115,7 @@ static int write_archive_entry(const unsigned char *sha1, const char *base,
115115
116116 strbuf_reset (& path );
117117 strbuf_grow (& path , PATH_MAX );
118+ strbuf_add (& path , args -> base , args -> baselen );
118119 strbuf_add (& path , base , baselen );
119120 strbuf_addstr (& path , filename );
120121 path_without_prefix = path .buf + args -> baselen ;
@@ -187,8 +188,8 @@ int write_archive_entries(struct archiver_args *args,
187188 git_attr_set_direction (GIT_ATTR_INDEX , & the_index );
188189 }
189190
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 );
192193 if (err == READ_TREE_RECURSIVE )
193194 err = 0 ;
194195 return err ;
@@ -211,7 +212,7 @@ static const struct archiver *lookup_archiver(const char *name)
211212static void parse_pathspec_arg (const char * * pathspec ,
212213 struct archiver_args * ar_args )
213214{
214- ar_args -> pathspec = get_pathspec (ar_args -> base , pathspec );
215+ ar_args -> pathspec = get_pathspec ("" , pathspec );
215216}
216217
217218static void parse_treeish_arg (const char * * argv ,
0 commit comments