Merge branch 'nd/sparse'
* nd/sparse: (25 commits) t7002: test for not using external grep on skip-worktree paths t7002: set test prerequisite "external-grep" if supported grep: do not do external grep on skip-worktree entries commit: correctly respect skip-worktree bit ie_match_stat(): do not ignore skip-worktree bit with CE_MATCH_IGNORE_VALID tests: rename duplicate t1009 sparse checkout: inhibit empty worktree Add tests for sparse checkout read-tree: add --no-sparse-checkout to disable sparse checkout support unpack-trees(): ignore worktree check outside checkout area unpack_trees(): apply $GIT_DIR/info/sparse-checkout to the final index unpack-trees(): "enable" sparse checkout and load $GIT_DIR/info/sparse-checkout unpack-trees.c: generalize verify_* functions unpack-trees(): add CE_WT_REMOVE to remove on worktree alone Introduce "sparse checkout" dir.c: export excluded_1() and add_excludes_from_file_1() excluded_1(): support exclude files in index unpack-trees(): carry skip-worktree bit over in merged_entry() Read .gitignore from index if it is skip-worktree Avoid writing to buffer in add_excludes_from_file_1() ... Conflicts: .gitignore Documentation/config.txt Documentation/git-update-index.txt Makefile entry.c t/t7002-grep.sh
This commit is contained in:
@ -159,7 +159,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ce_uptodate(ce))
|
||||
if (ce_uptodate(ce) || ce_skip_worktree(ce))
|
||||
continue;
|
||||
|
||||
/* If CE_VALID is set, don't look at workdir for file removal */
|
||||
@ -323,7 +323,8 @@ static void do_oneway_diff(struct unpack_trees_options *o,
|
||||
int match_missing, cached;
|
||||
|
||||
/* if the entry is not checked out, don't examine work tree */
|
||||
cached = o->index_only || (idx && (idx->ce_flags & CE_VALID));
|
||||
cached = o->index_only ||
|
||||
(idx && ((idx->ce_flags & CE_VALID) || ce_skip_worktree(idx)));
|
||||
/*
|
||||
* Backward compatibility wart - "diff-index -m" does
|
||||
* not mean "do not ignore merges", but "match_missing".
|
||||
|
Reference in New Issue
Block a user