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

Re: [PATCH] t3706: Add test for wildcard vs literal pathspec

From
JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com>
Date
Apr 16, 2025, 14:49 UTC
Message-ID
<CA+rGoLesZ3nSjruJ8_XRWVsFpMu8mo_4cCOdB-GFHU_qXkXDCQ@mail.gmail.com>
In-Reply-To
<xmqqa58gjlnk.fsf@gitster.g>
On Wed, Apr 16, 2025 at 6:42 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
>
> JAYATHEERTH K <jayatheerthkulkarni2005@gmail.com> writes:
>
> > I think something like git commit "*" -m "Test" also would be a great test
> > or even git rm command.
>
> Yes, there are things other than "git add" that  take pathspec (even
> "git ls-files" does so), and demonstrating the blast radious of the
> existing "bug" you fixed, with how they behave differently and
> better with your fix, would be a good thing to do.
>

Yes ls-files is also a great example, I will add them in the test. I think for the pathspec and glob specific commands almost all the commands share the same code, so it should work the same for all.

Show 12 quoted lines
> But make sure you follow "dashed options first, then other args"
> convention.  I do not offhand know (and *MORE* *IMPORTANTLY*, I do
> not want anybody to depend on) what the current command line parser
> happens to do to
>
>         git commit "*" -m "Test"
>
> If you meant to say that a pathspec with glob, always write it the
> right way:
>
>         git commit -m "Test" -- "*"
>
Ok, it makes sense, I will follow this format.
Show 7 quoted lines
> > About the windows question, I think I will see if there is any common
> > ground I could find
> > But until then I think prereq is a great option.
>
> The FUNNYNAMES prereq was invented to mark tests that rely on
> filesystem being able to handle certain letters, so that may be a
> good thing to use.

Noted will add this too, I'm still finding all the possible files and how they could matter in this test. Once I do that and check if the CI works or not and if I cannot make it work with both platforms (Which I think most probably will happen) I will add the prereq FUNNYNAMES as intended.

-Jayatheerth
Previous: Junio C HamanoNext: Lucas Seiki Oshiro
Message 10 of 19 in “add: fix pathspec handling when literal filenames match wildcard”
  1. 0/1 add: fix pathspec handling when literal filenames match wildcardK Jayatheerth, Apr 12, 2025
  2. 1/1 add: fix handling literal filenames and wildcardsK Jayatheerth, Apr 12, 2025
  3. t3706: Add test for wildcard vs literal pathspecK Jayatheerth, Apr 12, 2025
  4. Lucas Seiki OshiroApr 14, 2025
  5. JAYATHEERTH KApr 14, 2025
  6. Junio C HamanoApr 14, 2025
  7. brian m. carlsonApr 15, 2025
  8. JAYATHEERTH KApr 16, 2025
  9. Junio C HamanoApr 16, 2025
  10. JAYATHEERTH KApr 16, 2025
  11. Lucas Seiki OshiroApr 16, 2025
  12. Junio C HamanoApr 16, 2025
  13. JAYATHEERTH KApr 19, 2025
  14. Lucas Seiki OshiroApr 19, 2025
  15. JAYATHEERTH KApr 22, 2025
  16. JAYATHEERTH KApr 16, 2025
  17. JAYATHEERTH KApr 16, 2025
  18. Lucas Seiki OshiroApr 12, 2025
  19. JAYATHEERTH KApr 12, 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.