Merge branch 'cb/add-pathspec'
* cb/add-pathspec: remove pathspec_match, use match_pathspec instead clean up pathspec matching
This commit is contained in:
@ -230,7 +230,7 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec,
|
||||
|
||||
for (pos = 0; pos < active_nr; pos++) {
|
||||
struct cache_entry *ce = active_cache[pos];
|
||||
pathspec_match(pathspec, ps_matched, ce->name, 0);
|
||||
match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, ps_matched);
|
||||
}
|
||||
|
||||
if (report_path_error(ps_matched, pathspec, 0))
|
||||
@ -239,7 +239,7 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec,
|
||||
/* Any unmerged paths? */
|
||||
for (pos = 0; pos < active_nr; pos++) {
|
||||
struct cache_entry *ce = active_cache[pos];
|
||||
if (pathspec_match(pathspec, NULL, ce->name, 0)) {
|
||||
if (match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, NULL)) {
|
||||
if (!ce_stage(ce))
|
||||
continue;
|
||||
if (opts->force) {
|
||||
@ -264,7 +264,7 @@ static int checkout_paths(struct tree *source_tree, const char **pathspec,
|
||||
state.refresh_cache = 1;
|
||||
for (pos = 0; pos < active_nr; pos++) {
|
||||
struct cache_entry *ce = active_cache[pos];
|
||||
if (pathspec_match(pathspec, NULL, ce->name, 0)) {
|
||||
if (match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, NULL)) {
|
||||
if (!ce_stage(ce)) {
|
||||
errs |= checkout_entry(ce, &state, NULL);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user