Merge branch 'jl/submodule-mv'
"git mv A B" when moving a submodule A does "the right thing", inclusing relocating its working tree and adjusting the paths in the .gitmodules file. * jl/submodule-mv: (53 commits) rm: delete .gitmodules entry of submodules removed from the work tree mv: update the path entry in .gitmodules for moved submodules submodule.c: add .gitmodules staging helper functions mv: move submodules using a gitfile mv: move submodules together with their work trees rm: do not set a variable twice without intermediate reading. t6131 - skip tests if on case-insensitive file system parse_pathspec: accept :(icase)path syntax pathspec: support :(glob) syntax pathspec: make --literal-pathspecs disable pathspec magic pathspec: support :(literal) syntax for noglob pathspec kill limit_pathspec_to_literal() as it's only used by parse_pathspec() parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN parse_pathspec: make sure the prefix part is wildcard-free rename field "raw" to "_raw" in struct pathspec tree-diff: remove the use of pathspec's raw[] in follow-rename codepath remove match_pathspec() in favor of match_pathspec_depth() remove init_pathspec() in favor of parse_pathspec() remove diff_tree_{setup,release}_paths convert common_prefix() to use struct pathspec ...
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
#include "quote.h"
|
||||
#include "builtin.h"
|
||||
#include "parse-options.h"
|
||||
#include "pathspec.h"
|
||||
|
||||
static int line_termination = '\n';
|
||||
#define LS_RECURSIVE 1
|
||||
@ -35,7 +36,7 @@ static int show_recursive(const char *base, int baselen, const char *pathname)
|
||||
if (ls_options & LS_RECURSIVE)
|
||||
return 1;
|
||||
|
||||
s = pathspec.raw;
|
||||
s = pathspec._raw;
|
||||
if (!s)
|
||||
return 0;
|
||||
|
||||
@ -166,7 +167,15 @@ int cmd_ls_tree(int argc, const char **argv, const char *prefix)
|
||||
if (get_sha1(argv[0], sha1))
|
||||
die("Not a valid object name %s", argv[0]);
|
||||
|
||||
init_pathspec(&pathspec, get_pathspec(prefix, argv + 1));
|
||||
/*
|
||||
* show_recursive() rolls its own matching code and is
|
||||
* generally ignorant of 'struct pathspec'. The magic mask
|
||||
* cannot be lifted until it is converted to use
|
||||
* match_pathspec_depth() or tree_entry_interesting()
|
||||
*/
|
||||
parse_pathspec(&pathspec, PATHSPEC_GLOB | PATHSPEC_ICASE,
|
||||
PATHSPEC_PREFER_CWD,
|
||||
prefix, argv + 1);
|
||||
for (i = 0; i < pathspec.nr; i++)
|
||||
pathspec.items[i].nowildcard_len = pathspec.items[i].len;
|
||||
pathspec.has_wildcard = 0;
|
||||
|
Reference in New Issue
Block a user