Merge branch 'nd/submodule-pathspec-ending-with-slash'
Allow "git cmd path/", when the 'path' is where a submodule is bound to the top-level working tree, to match 'path', despite the extra and unnecessary trailing slash. * nd/submodule-pathspec-ending-with-slash: clean: use cache_name_is_other() clean: replace match_pathspec() with dir_path_match() pathspec: pass directory indicator to match_pathspec_item() match_pathspec: match pathspec "foo/" against directory "foo" dir.c: prepare match_pathspec_item for taking more flags pathspec: rename match_pathspec_depth() to match_pathspec() pathspec: convert some match_pathspec_depth() to dir_path_match() pathspec: convert some match_pathspec_depth() to ce_path_match()
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "resolve-undo.h"
|
||||
#include "parse-options.h"
|
||||
#include "pathspec.h"
|
||||
#include "dir.h"
|
||||
|
||||
/*
|
||||
* Default to not allowing changes to the list of files. The
|
||||
@ -561,7 +562,7 @@ static int do_reupdate(int ac, const char **av,
|
||||
int save_nr;
|
||||
char *path;
|
||||
|
||||
if (ce_stage(ce) || !ce_path_match(ce, &pathspec))
|
||||
if (ce_stage(ce) || !ce_path_match(ce, &pathspec, NULL))
|
||||
continue;
|
||||
if (has_head)
|
||||
old = read_one_ent(NULL, head_sha1,
|
||||
|
||||
Reference in New Issue
Block a user