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

[WIP PATCH 0/5] support --exclude for diff/log commands

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Mar 10, 2011, 03:13 UTC
Message-ID
<1299726819-5576-1-git-send-email-pclouds@gmail.com>

This is not really ready for review or use, but I'd like to have feedback if any, where this series is heading because it requires some code refactor in diff/rev machinery. It does not feel absolutely right to me.

On the other hand, if we go with ':' as a mark of special pathspecs, then
 - ":/" mark pathspecs relative to worktree root
 - ":!" may mark negative pathspecs
Less changes in diff/rev this way.
Nguyễn Thái Ngọc Duy (5):
  tree-walk: support negative pathspec
  match_pathspec_depth: support negative pathspec

match_pathspec_depth needs work. tree_entry_interesting() can use some optimization, but leave it for now.

  revision.c: get rid of struct rev_info.prune_data
  diff: refactor init/release API

These two facilitate post pathspec manipulation to transform --exclude to pathspecs with to_exclude = 1.

  diff: support --exclude
 Documentation/technical/api-diff.txt |    2 +-
 builtin/add.c                        |    3 +-
 builtin/blame.c                      |   22 +++++----------
 builtin/diff.c                       |    6 ++--
 builtin/fast-export.c                |    2 +-
 builtin/merge.c                      |    2 +-
 builtin/reset.c                      |    4 +-
 cache.h                              |    1 +
 diff-lib.c                           |    6 ++--
 diff-no-index.c                      |    6 ++--
 diff.c                               |   49 ++++++++++++++++++++++++++++++++-
 diff.h                               |    6 ++--
 dir.c                                |    5 +++
 merge-recursive.c                    |    2 +-
 notes-merge.c                        |    8 +++---
 patch-ids.c                          |    2 +-
 revision.c                           |   22 ++++++++-------
 revision.h                           |    1 -
 tree-diff.c                          |   21 +++------------
 tree-walk.c                          |   37 +++++++++++++++++++------
 wt-status.c                          |    6 +---
 21 files changed, 130 insertions(+), 83 deletions(-)
-- 
1.7.3.1.256.g2539c.dirty
Next: Nguyễn Thái Ngọc Duy
Message 1 of 20 in “support --exclude for diff/log commands”
  1. 0/5 support --exclude for diff/log commandsNguyễn Thái Ngọc Duy, Mar 10, 2011
  2. 1/5 tree-walk: support negative pathspecNguyễn Thái Ngọc Duy, Mar 10, 2011
  3. 2/5 match_pathspec_depth: support negative pathspecNguyễn Thái Ngọc Duy, Mar 10, 2011
  4. 3/5 revision.c: get rid of struct rev_info.prune_dataNguyễn Thái Ngọc Duy, Mar 10, 2011
  5. Junio C HamanoMar 10, 2011
  6. Nguyen Thai Ngoc DuyMar 10, 2011
  7. 4/5 diff: refactor init/release APINguyễn Thái Ngọc Duy, Mar 10, 2011
  8. 5/5 diff: support --excludeNguyễn Thái Ngọc Duy, Mar 10, 2011
  9. Junio C HamanoMar 10, 2011
  10. Nguyen Thai Ngoc DuyMar 10, 2011
  11. Junio C HamanoMar 10, 2011
  12. Nguyen Thai Ngoc DuyMar 10, 2011
  13. Nguyen Thai Ngoc DuyMar 21, 2011
  14. Michael J GruberMar 21, 2011
  15. Nguyen Thai Ngoc DuyMar 21, 2011
  16. Junio C HamanoMar 22, 2011
  17. Nguyen Thai Ngoc DuyMar 23, 2011
  18. Nguyen Thai Ngoc DuyMar 23, 2011
  19. Michael J GruberMar 23, 2011
  20. Nguyen Thai Ngoc DuyMar 23, 2011

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.