On Thu, Apr 16, 2009 at 8:50 PM, Nguyen Thai Ngoc Duy wrote: > I was thinking about loading .gitattributes inside write_archive_entry > too, to avoid calling read_tree_recursive twice, but it requires > .gitattributes to be traversed first. Won't work if there are files > .abc, .def... > > If read_tree_recusive() expose its tree to read_tree_fn_t, we can then > look ahead and load .gitattributes, but that requires changing > read_tree_fn_t interface. I'll see if it's feasible to make a > customized read_tree_recusive() just for archive.c Here it is (again on top of your patch). Need to read directories twice, but not as bad as read_tree_recursive() twice. -- Duy