mirror of
https://github.com/git/git.git
synced 2026-04-12 01:40:10 +02:00
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:
@@ -474,7 +474,6 @@ static int diff_cache(struct rev_info *revs,
|
||||
opts.dst_index = NULL;
|
||||
opts.pathspec = &revs->diffopt.pathspec;
|
||||
opts.pathspec->recursive = 1;
|
||||
opts.pathspec->max_depth = -1;
|
||||
|
||||
init_tree_desc(&t, tree->buffer, tree->size);
|
||||
return unpack_trees(1, &t, &opts);
|
||||
@@ -500,7 +499,7 @@ int do_diff_cache(const unsigned char *tree_sha1, struct diff_options *opt)
|
||||
struct rev_info revs;
|
||||
|
||||
init_revisions(&revs, NULL);
|
||||
init_pathspec(&revs.prune_data, opt->pathspec.raw);
|
||||
copy_pathspec(&revs.prune_data, &opt->pathspec);
|
||||
revs.diffopt = *opt;
|
||||
|
||||
if (diff_cache(&revs, tree_sha1, NULL, 1))
|
||||
|
||||
Reference in New Issue
Block a user