void setup_traverse_info(struct traverse_info *info, const char *base)
{
int pathlen = strlen(base);
+ static struct traverse_info dummy;
memset(info, 0, sizeof(*info));
if (pathlen && base[pathlen-1] == '/')
info->pathlen = pathlen ? pathlen + 1 : 0;
info->name.path = base;
info->name.sha1 = (void *)(base + pathlen + 1);
+ if (pathlen)
+ info->prev = &dummy;
}
char *make_traverse_path(char *path, const struct traverse_info *info, const struct name_entry *n)