Rebuild repo only for non-empty dirs (once)