Skip to content

Sparse checkout fixes and improvements

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 Latest10 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10add: do not rely on dtype being NULL behaviorbuiltin/add.c+2 -15 replies
2/10unpack-trees: move all skip-worktree check back to unpack_trees()cache.h unpack-trees.c+63 -74 replies
3/10unpack-trees: add function to update ce_flags based on sparse patternsunpack-trees.c+88 -02 replies
4/10unpack-trees: fix sparse checkout's "unable to match directories" faultDocumentation/git-read-tree.txt dir.c t/t1011-read-tree-sparse-checkout.sh +1 more+29 -312 replies
5/10unpack-trees: optimize full checkout caseunpack-trees.c+10 -01 reply
6/10templates: add info/sparse-checkouttemplates/info--sparse-checkout+3 -00 replies
7/10checkout: add -S to update sparse checkoutDocumentation/git-checkout.txt builtin/checkout.c t/t1011-read-tree-sparse-checkout.sh +1 more+76 -14 replies
8/10checkout: add --full to fully populate working directoryDocumentation/git-checkout.txt builtin/checkout.c t/t1011-read-tree-sparse-checkout.sh+32 -42 replies
9/10git-checkout.txt: mention of sparse checkoutDocumentation/git-checkout.txt Documentation/git-read-tree.txt+30 -100 replies
10/10clean: support cleaning sparse checkout with -SDocumentation/git-clean.txt builtin/clean.c t/t7301-clean-sparse.sh+167 -13 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/10] Sparse checkout fixes and improvements

The first part fixes the long standing t1011.7 and removes the work around in excluded_from_list(). As a result, the EXC_FLAG_MUSTBEDIR fix for sparse checkout [1] is no longer needed.

Another plus is that because the index is now traversed tree-alike, when a directory is match, all its children does not need to be checked, which could speed things up a bit.

[1] http://http://article.gmane.org/gmane.comp.version-control.git/160892

Nguyễn Thái Ngọc Duy (10):
add: do not rely on dtype being NULL behavior
unpack-trees: move all skip-worktree check back to unpack_trees()
unpack-trees: add function to update ce_flags based on sparse
patterns
unpack-trees: fix sparse checkout's "unable to match directories"
fault

The second part is more experimental although I think it's good change:

unpack-trees: optimize full checkout case

The intention is that $GIT_DIR/info/sparse-checkout can be always-on. But it should not impact performance when not really used.

templates: add info/sparse-checkout

I should have done this long before. I did not notice it until recently.

checkout: add -S to update sparse checkout
checkout: add --full to fully populate working directory git-checkout.txt: mention of sparse checkout

These form a friendlier interface to update sparse checkout. Users need not to dig deep in git-read-tree.txt just to use sparse checkout. "git checkout -S" resembles "cleartool edcs", which makes sense to me. Both edit a file (location "unknown" in clearcase case) and update worktree after that.

clean: support cleaning sparse checkout with -S

Sparse checkout does not prohibit you from checking out other parts of the index. But you are pretty much left alone when doing so. This helps a bit. Support "git clean -S -e" is possible with clear_ce_flags() from the first part of this series but I need to think a bit more.

 Documentation/git-checkout.txt       |   49 +++++++++
 Documentation/git-clean.txt          |    6 +-
 Documentation/git-read-tree.txt      |   18 +---
 builtin/add.c                        |    3 +-
 builtin/checkout.c                   |   59 +++++++++++-
 builtin/clean.c                      |   70 +++++++++++++
 cache.h                              |    1 +
 dir.c                                |    6 -
 t/t1011-read-tree-sparse-checkout.sh |   39 +++++++-
 t/t7301-clean-sparse.sh              |   92 +++++++++++++++++
 templates/info--sparse-checkout      |    4 +
 unpack-trees.c                       |  188 +++++++++++++++++++++++++++++++---
 12 files changed, 490 insertions(+), 45 deletions(-)
 create mode 100755 t/t7301-clean-sparse.sh
 create mode 100644 templates/info--sparse-checkout
Signature · 1 line
1.7.3.2.210.g045198