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

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

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 15, 2025, 22:32 UTC
Message-ID
<Z_7ekhsBzXK6LKuV@tapette.crustytoothpaste.net>
In-Reply-To
<20250412174051.780148-1-jayatheerthkulkarni2005@gmail.com>
On 2025-04-12 at 17:40:51, K Jayatheerth wrote:
> +test_expect_success 'recreate files to test add behavior' '
> +    mkdir testdir &&
> +    >testdir/f\* &&
> +    >testdir/f\*\* &&

I just want to point out that creating files with asterisks may not be possible on Windows due to limitations in the file system. I'm not a Windows expert, so unfortunately I can't provide more details than that, but you may end up needing to add a prerequisite here to skip this on our Windows platforms if necessary. Hopefully CI and a suitable search can help you figure it out.

> +test_done
> \ No newline at end of file

We do want to keep newlines at the end of a file. POSIX mandates one on text files and some systems are less tolerant of missing newlines than others. Usually Linux and the BSDs handle this just fine, but some proprietary Unix systems, which unfortunately we don't have CI for, tend to be the ones that are less happy about this.

I haven't given this a full review, since others have done that instead, but just pointed out one or two things that got my attention.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Junio C HamanoNext: JAYATHEERTH K
Message 7 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.