Thread (61 messages) 61 messages, 7 authors, 2021-04-14

[RFC PATCH 0/7] add/rm: honor sparse checkout and warn on sparse paths

flat view
STALE2017d SUPERSEDED

From: Matheus Tavares <hidden>
Date: 2021-02-17 21:03:25

Revision rfc of 4 in this series.

Revisions (4)
  1. rfc current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
This is based on the discussion at [1]. It makes `rm` honor sparse
checkouts and adds a warning to both `rm` and `add`, for the case where
a pathspec _only_ matches skip-worktree entries. The first two patches
are somewhat unrelated fixes, but they are used by the later patches.

[1]: https://lore.kernel.org/git/CABPp-BHwNoVnooqDFPAsZxBT9aR5Dwk5D9sDRCvYSb8akxAJgA@mail.gmail.com/ (local)

Matheus Tavares (7):
  add --chmod: don't update index when --dry-run is used
  add: include magic part of pathspec on --refresh error
  t3705: add tests for `git add` in sparse checkouts
  add: make --chmod and --renormalize honor sparse checkouts
  pathspec: allow to ignore SKIP_WORKTREE entries on index matching
  add: warn when pathspec only matches SKIP_WORKTREE entries
  rm: honor sparse checkout patterns

 Documentation/config/advice.txt  |   4 +
 Documentation/git-rm.txt         |   4 +-
 advice.c                         |  19 +++++
 advice.h                         |   4 +
 builtin/add.c                    |  72 ++++++++++++++----
 builtin/check-ignore.c           |   2 +-
 builtin/rm.c                     |  35 ++++++---
 pathspec.c                       |  25 ++++++-
 pathspec.h                       |  13 +++-
 read-cache.c                     |   3 +-
 t/t3600-rm.sh                    |  54 ++++++++++++++
 t/t3700-add.sh                   |  26 +++++++
 t/t3705-add-sparse-checkout.sh   | 122 +++++++++++++++++++++++++++++++
 t/t7011-skip-worktree-reading.sh |   5 --
 t/t7012-skip-worktree-writing.sh |  19 -----
 15 files changed, 349 insertions(+), 58 deletions(-)
 create mode 100755 t/t3705-add-sparse-checkout.sh

-- 
2.29.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help