git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 00/10] Sparse checkout fixes and improvements

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Nov 15, 2010, 10:36 UTC
Message-ID
<1289817410-32470-1-git-send-email-pclouds@gmail.com>

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
Next: Nguyễn Thái Ngọc Duy
Message 1 of 34 in “Sparse checkout fixes and improvements”
  1. 00/10 Sparse checkout fixes and improvementsNguyễn Thái Ngọc Duy, Nov 15, 2010
  2. 01/10 add: do not rely on dtype being NULL behaviorNguyễn Thái Ngọc Duy, Nov 15, 2010
  3. Jonathan NiederNov 15, 2010
  4. Nguyen Thai Ngoc DuyNov 16, 2010
  5. Jonathan NiederNov 16, 2010
  6. Junio C HamanoNov 16, 2010
  7. Nguyen Thai Ngoc DuyNov 17, 2010
  8. 02/10 unpack-trees: move all skip-worktree check back to unpack_trees()Nguyễn Thái Ngọc Duy, Nov 15, 2010
  9. Thiago FarinaNov 15, 2010
  10. Nguyen Thai Ngoc DuyNov 16, 2010
  11. Jonathan NiederNov 15, 2010
  12. Nguyen Thai Ngoc DuyNov 16, 2010
  13. 03/10 unpack-trees: add function to update ce_flags based on sparse patternsNguyễn Thái Ngọc Duy, Nov 15, 2010
  14. Jonathan NiederNov 15, 2010
  15. Jonathan NiederNov 15, 2010
  16. 04/10 unpack-trees: fix sparse checkout's "unable to match directories" faultNguyễn Thái Ngọc Duy, Nov 15, 2010
  17. Jonathan NiederNov 15, 2010
  18. Nguyen Thai Ngoc DuyNov 16, 2010
  19. 05/10 unpack-trees: optimize full checkout caseNguyễn Thái Ngọc Duy, Nov 15, 2010
  20. Jonathan NiederNov 15, 2010
  21. 06/10 templates: add info/sparse-checkoutNguyễn Thái Ngọc Duy, Nov 15, 2010
  22. 07/10 checkout: add -S to update sparse checkoutNguyễn Thái Ngọc Duy, Nov 15, 2010
  23. Jonathan NiederNov 15, 2010
  24. Miles BaderNov 15, 2010
  25. Nguyen Thai Ngoc DuyNov 17, 2010
  26. Nguyen Thai Ngoc DuyNov 16, 2010
  27. 08/10 checkout: add --full to fully populate working directoryNguyễn Thái Ngọc Duy, Nov 15, 2010
  28. Jonathan NiederNov 15, 2010
  29. Nguyen Thai Ngoc DuyNov 16, 2010
  30. 09/10 git-checkout.txt: mention of sparse checkoutNguyễn Thái Ngọc Duy, Nov 15, 2010
  31. 10/10 clean: support cleaning sparse checkout with -SNguyễn Thái Ngọc Duy, Nov 15, 2010
  32. Jonathan NiederNov 15, 2010
  33. Nguyen Thai Ngoc DuyNov 16, 2010
  34. Jonathan NiederNov 16, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.