On Sat, Mar 16, 2013 at 12:56 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: > >> @@ -232,11 +228,18 @@ static int path_exists(struct tree *tree, const char *path) >> static void parse_pathspec_arg(const char **pathspec, >> struct archiver_args *ar_args) >> { >> - ar_args->pathspec = pathspec = get_pathspec("", pathspec); >> + /* >> + * must be consistent with parse_pathspec in path_exists() >> + * Also if pathspec patterns are dependent, we're in big >> + * trouble as we test each one separately >> + */ >> + parse_pathspec(&ar_args->pathspec, 0, >> + PATHSPEC_PREFER_FULL, >> + "", pathspec); >> if (pathspec) { >> while (*pathspec) { >> if (!path_exists(ar_args->tree, *pathspec)) >> - die("path not found: %s", *pathspec); >> + die(_("pathspec '%s' did not match any files"), *pathspec); >> pathspec++; >> } > > You do not use ar_args->pathspec even though you used parse_pathspec() > to grok it? What's the point of this change? parse_pathspec() here is needed because write_archive_entries needs it later. tree_entry_interesting() has not supported "seen" feature like match_pathspec_depth() to detect unused pathspecs. For simplicity, just check each pathspec individually. We can revisit this when we add "seen" feature to tree_entry_interesting. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html