Subject: [PATCH 00/10] Sparse checkout fixes and improvements

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Mon, 15 Nov 2010 17:36:40 +0700

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

-- 
1.7.3.2.210.g045198