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:
11
revision.c
11
revision.c
@ -1373,7 +1373,7 @@ static void prepare_show_merge(struct rev_info *revs)
|
||||
i++;
|
||||
}
|
||||
free_pathspec(&revs->prune_data);
|
||||
init_pathspec(&revs->prune_data, prune);
|
||||
parse_pathspec(&revs->prune_data, PATHSPEC_ALL_MAGIC, 0, "", prune);
|
||||
revs->limited = 1;
|
||||
}
|
||||
|
||||
@ -2121,8 +2121,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
|
||||
*/
|
||||
ALLOC_GROW(prune_data.path, prune_data.nr+1, prune_data.alloc);
|
||||
prune_data.path[prune_data.nr++] = NULL;
|
||||
init_pathspec(&revs->prune_data,
|
||||
get_pathspec(revs->prefix, prune_data.path));
|
||||
parse_pathspec(&revs->prune_data, 0, 0,
|
||||
revs->prefix, prune_data.path);
|
||||
}
|
||||
|
||||
if (revs->def == NULL)
|
||||
@ -2155,12 +2155,13 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
|
||||
revs->limited = 1;
|
||||
|
||||
if (revs->prune_data.nr) {
|
||||
diff_tree_setup_paths(revs->prune_data.raw, &revs->pruning);
|
||||
copy_pathspec(&revs->pruning.pathspec, &revs->prune_data);
|
||||
/* Can't prune commits with rename following: the paths change.. */
|
||||
if (!DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES))
|
||||
revs->prune = 1;
|
||||
if (!revs->full_diff)
|
||||
diff_tree_setup_paths(revs->prune_data.raw, &revs->diffopt);
|
||||
copy_pathspec(&revs->diffopt.pathspec,
|
||||
&revs->prune_data);
|
||||
}
|
||||
if (revs->combine_merges)
|
||||
revs->ignore_merges = 0;
|
||||
|
||||
Reference in New Issue
Block a user