archive: don't queue excluded directories
authorRené Scharfe <l.s.r@web.de>
Sat, 19 Aug 2017 05:32:37 +0000 (07:32 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 19 Aug 2017 07:40:25 +0000 (00:40 -0700)
Reject directories with the attribute export-ignore already while
queuing them. This prevents read_tree_recursive() from descending into
them and this avoids write_archive_entry() rejecting them later on,
which queue_or_write_archive_entry() is not prepared for.

Borrow the existing strbuf to build the full path to avoid string
copies and extra allocations; just make sure we restore the original
value before moving on.

Keep checking any other attributes in write_archive_entry() as before,
but avoid checking them twice.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found