Skip to content

RFC Sparse checkout resurrection

Nguyễn Thái Ngọc Duy git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Prevent diff machinery from examining worktree outside sparse checkoutdiff-lib.c diff.c+6 -31 reply
2/5grep: skip files outside sparse checkout areaDocumentation/git-grep.txt builtin-grep.c+9 -22 replies
3/5gitignore: read from index if .gitignore is not in worktreedir.c t/t3001-ls-files-others-exclude.sh+67 -231 reply
4/5unpack_trees(): keep track of unmerged entriesbuiltin-read-tree.c unpack-trees.c unpack-trees.h+14 -10 replies
5/5unpack_trees(): add support for sparse checkoutcache.h unpack-trees.c unpack-trees.h+133 -63 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/5] Sparse checkout resurrection

Hi,

I rip most of the code from my sparse checkout series, leaving only basic stuff. Now there is no CE_NO_CHECKOUT bit (CE_VALID will be used), no sparse pattterns. You will need to provide a script, namely "git-shape-workdir", to specify how you want to shape your workdir. That's all. No porcelain, only plumbing. Need to add some options to read-tree and checkout in order to enable/disable this, but I haven't got that far.

The first four patches is more or less CE_VALID fixups. Real stuff is in the last patch. Sparse patterns may return as a separate script. Currently no idea how the porcelain UI should be. The only thing that is probably impossible this way is "git clone --sparse". You may need to "clone -n" first, then apply sparse checkout later.

Comments?

Nguyễn Thái Ng�c Duy (5):
Prevent diff machinery from examining worktree outside sparse checkout
grep: skip files outside sparse checkout area
gitignore: read from index if .gitignore is not in worktree unpack_trees(): keep track of unmerged entries unpack_trees(): add support for sparse checkout

 Documentation/git-grep.txt         |    4 +-
 builtin-grep.c                     |    7 ++-
 builtin-read-tree.c                |    6 ++-
 cache.h                            |    4 +
 diff-lib.c                         |    5 +-
 diff.c                             |    4 +-
 dir.c                              |   70 ++++++++++++------
 t/t3001-ls-files-others-exclude.sh |   20 +++++
 unpack-trees.c                     |  140 ++++++++++++++++++++++++++++++++++--
 unpack-trees.h                     |    4 +
 10 files changed, 229 insertions(+), 35 deletions(-)