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

[PATCH 0/2] [GSoC Patch] t2000: modernize path checks to use helper functions

From
Zakariyah Ali via GitGitGadget <gitgitgadget@gmail.com>
Date
May 23, 2026, 11:07 UTC
Message-ID
<pull.2256.git.git.1779534462.gitgitgadget@gmail.com>

This is my GSoC microproject submission modernizing test path checks in t/t2000-conflict-when-checking-files-out.sh.

Replace old-style path checks using test -f, test -d, and test ! -h with dedicated test helper functions for improved test clarity and consistency.

This modernization improves test script readability by using Git's dedicated test helpers:

test -f → test_path_is_file test -d → test_path_is_dir test ! -h && test -f → test_path_is_file_not_symlink test ! -h && test -d → test_path_is_dir_not_symlink Found instances using: git grep 'test -[efd]' t/ | grep 'test -[efd].*&&'

Converted 5 instances in t/t2000-conflict-when-checking-files-out.sh
This improves test clarity and consistency across the test suite.
I'm excited to contribute to Git and look forward to your feedback!
Zakariyah Ali (2):
  t2000: consolidate second scenario into a single test block
  t2000: cleanup unused debug code and variables
 t/t2000-conflict-when-checking-files-out.sh | 65 +++------------------
 1 file changed, 8 insertions(+), 57 deletions(-)
base-commit: 60f07c4f5c5f81c8a994d9e06b31a4a3a1679864
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2256%2Falibaba0010%2Fmodernize-test-path-checking-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2256/alibaba0010/modernize-test-path-checking-v1
Pull-Request: https://github.com/git/git/pull/2256
-- 
gitgitgadget
Next: Zakariyah Ali via GitGitGadget
Message 1 of 4 in “t2000: modernize path checks to use helper functions”
  1. 0/2 [GSoC Patch] t2000: modernize path checks to use helper functionsZakariyah Ali via GitGitGadget, May 23, 2026
  2. 1/2 t2000: consolidate second scenario into a single test blockZakariyah Ali via GitGitGadget, May 23, 2026
  3. 2/2 t2000: cleanup unused debug code and variablesZakariyah Ali via GitGitGadget, May 23, 2026
  4. Junio C HamanoMay 24, 2026

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.