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

Re: [PATCH v4 0/3] diff: add pathspec support to --no-index

From
Junio C Hamano <gitster@pobox.com>
Date
May 22, 2025, 21:37 UTC
Message-ID
<xmqqzff42uod.fsf@gitster.g>
In-Reply-To
<20250521232917.2333291-1-jacob.e.keller@intel.com>
Jacob Keller <jacob.e.keller@intel.com> writes:
Show 15 quoted lines
> From: Jacob Keller <jacob.keller@gmail.com>
>
> This series adds support for using pathspecs to limit the comparison when
> using git diff --no-index. This is similar to how you can limit what is
> included with pathspecs when comparing inside a repository.
>
> This version uses only one set of pathspecs and instead uses some logic to
> skip past the root of each directory tree being scanned. This avoids needing
> to parse pathspecs multiple times, and is overall a simpler approach.
> ...
> I tried a couple of different methods for skipping past the leading portion
> of a path, including skip_prefix. Ultimately just the index to skip to
> seemed like the simplest solution. I like that it means we only need a
> single pathspec array now, and that we no longer have to worry about
> changing prefix_path_gently.

Nice. I kept the previous iteration out of 'seen' primarily because it seemed to break the tests (even though it passed standalone). Let me see how well we do with this iteration.

Will queue.  Thanks.
Previous: Jacob KellerNext: Jacob Keller
Message 17 of 22 in “diff: add pathspec support to --no-index”
  1. 0/3 diff: add pathspec support to --no-indexJacob Keller, May 21, 2025
  2. 1/3 pathspec: add match_leading_pathspec variantJacob Keller, May 21, 2025
  3. 2/3 pathspec: add flag to indicate operation without repositoryJacob Keller, May 21, 2025
  4. 3/3 diff --no-index: support limiting by pathspecJacob Keller, May 21, 2025
  5. Ben KnobleJun 4, 2025
  6. Jacob KellerJun 4, 2025
  7. Jacob KellerJun 4, 2025
  8. Junio C HamanoJun 4, 2025
  9. Jacob KellerJun 4, 2025
  10. D. Ben KnobleJun 4, 2025
  11. Junio C HamanoJun 4, 2025
  12. Johannes SchindelinSep 23, 2025
  13. Jacob KellerSep 23, 2025
  14. Johannes SchindelinSep 24, 2025
  15. Jacob KellerSep 24, 2025
  16. Jacob KellerSep 24, 2025
  17. Junio C HamanoMay 22, 2025
  18. Jacob KellerMay 22, 2025
  19. Junio C HamanoMay 22, 2025
  20. Junio C HamanoJun 3, 2025
  21. Ben KnobleJun 4, 2025
  22. Phillip WoodJun 5, 2025

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.