Thread View: linux.kernel.git
3 messages
3 total messages
Started by "Shashank S via GitGitGadget"
Fri, 16 Oct 2026 04:31
[PATCH] [Outreachy PATCH] t2403: modernize test for directory existence
Author: "Shashank S via GitGitGadget"
Date: Fri, 16 Oct 2026 04:31
Date: Fri, 16 Oct 2026 04:31
47 lines
9703 bytes
9703 bytes
From: Shashank <shashu8660@gmail.com>
Replace the old-style shell `test -d` commands with Git's modern
`test_path_is_dir` helper function.
This provides better debugging output if the tests were to fail,
as the helper prints a clear error message rather than just failing
silently like `test -d` does.
Signed-off-by: Shashank <shashu8660@gmail.com>
---
[Outreachy PATCH] t2403: modernize test for directory existence
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2259%2Fshashu8660%2Foutreachy1-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2259/shashu8660/outreachy1-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2259
t/t2403-worktree-move.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t2403-worktree-move.sh b/t/t2403-worktree-move.sh
index 69768c1207..85793f9460 100755
--- a/t/t2403-worktree-move.sh
+++ b/t/t2403-worktree-move.sh
@@ -182,7 +182,7 @@ test_expect_success 'force remove worktree with untracked file' '
test_expect_success 'remove missing worktree' '
git worktree add to-be-gone &&
- test -d .git/worktrees/to-be-gone &&
+ test_path_is_dir .git/worktrees/to-be-gone &&
mv to-be-gone gone &&
git worktree remove to-be-gone &&
test_path_is_missing .git/worktrees/to-be-gone
@@ -191,7 +191,7 @@ test_expect_success 'remove missing worktree' '
test_expect_success 'NOT remove missing-but-locked worktree' '
git worktree add gone-but-locked &&
git worktree lock gone-but-locked &&
- test -d .git/worktrees/gone-but-locked &&
+ test_path_is_dir .git/worktrees/gone-but-locked &&
mv gone-but-locked really-gone-now &&
test_must_fail git worktree remove gone-but-locked &&
test_path_is_dir .git/worktrees/gone-but-locked
base-commit: 6de20f6092dcf9bdb1c8efe03db4b70c82b423dd
--
gitgitgadget
Re: [PATCH] [Outreachy PATCH] t2403: modernize test for directory existence
Author: Usman Akinyemi
Date: Thu, 22 Oct 2026 07:34
Date: Thu, 22 Oct 2026 07:34
7 lines
11663 bytes
11663 bytes
> -- > gitgitgadget Looks good to me. Thanks
Re: [PATCH] [Outreachy PATCH] t2403: modernize test for directory existence
Author: Junio C Hamano
Date: Fri, 23 Oct 2026 17:09
Date: Fri, 23 Oct 2026 17:09
11 lines
12899 bytes
12899 bytes
Usman Akinyemi <usmanakinyemi202@gmail.com> writes: >> -- >> gitgitgadget > > Looks good to me. > > Thanks Thanks, both. Queued.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads