Thread View: linux.kernel.git
3 messages
3 total messages
Started by "Joy via GitGitGadget"
Wed, 21 Oct 2026 11:30
[PATCH] t3429: use test_path_is_file helper
Author: "Joy via GitGitGadget"
Date: Wed, 21 Oct 2026 11:30
Date: Wed, 21 Oct 2026 11:30
41 lines
11767 bytes
11767 bytes
From: Joy Gundu <soniqjjj@gmail.com>
Signed-off-by: Joy Gundu <soniqjjj@gmail.com>
---
t3429: use test_path_is_file helper
Replace test -e F with test_path_is_file F in t3429-rebase-edit-todo.sh
to use Git's semantic test helper and provide better diagnostics on
failure.
Tested with:
make NO_ICONV=YesPlease test T=t3429-rebase-edit-todo.sh
All 7 tests passed.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2274%2FJoiejoie1%2Foutreachy%2Ftest-path-helper-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2274/Joiejoie1/outreachy/test-path-helper-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/2274
t/t3429-rebase-edit-todo.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t3429-rebase-edit-todo.sh b/t/t3429-rebase-edit-todo.sh
index 28e4bdd0d9..a421c35d8a 100755
--- a/t/t3429-rebase-edit-todo.sh
+++ b/t/t3429-rebase-edit-todo.sh
@@ -14,7 +14,7 @@ test_expect_success 'setup' '
test_expect_success 'rebase exec modifies rebase-todo' '
todo=.git/rebase-merge/git-rebase-todo &&
git rebase HEAD~1 -x "echo exec touch F >>$todo" &&
- test -e F
+ test_path_is_file F
'
test_expect_success 'rebase exec with an empty list does not exec anything' '
base-commit: c51408889c3b372814bc20b9431c3b74d0d268eb
--
gitgitgadget
Re: [PATCH] t3429: use test_path_is_file helper
Author: Usman Akinyemi
Date: Thu, 22 Oct 2026 10:07
Date: Thu, 22 Oct 2026 10:07
29 lines
12612 bytes
12612 bytes
On Wed, Oct 21, 2026 at 12:30 PM Joy via GitGitGadget <gitgitgadget@gmail.com> wrote: > > From: Joy Gundu <soniqjjj@gmail.com> > > Signed-off-by: Joy Gundu <soniqjjj@gmail.com> > --- > t3429: use test_path_is_file helper > > Replace test -e F with test_path_is_file F in t3429-rebase-edit-todo.sh > to use Git's semantic test helper and provide better diagnostics on Why is the commit message down after the dashes, isn't is supposed to be at the top? > todo=.git/rebase-merge/git-rebase-todo && > git rebase HEAD~1 -x "echo exec touch F >>$todo" && > - test -e F > + test_path_is_file F This is wrong, the initial patch is testing whether "F" exists, not whether it is a file. The appropriate function to use here is test_patch_exists. > ' > > test_expect_success 'rebase exec with an empty list does not exec anything' ' > > base-commit: c51408889c3b372814bc20b9431c3b74d0d268eb > -- > gitgitgadget
Re: [PATCH] t3429: use test_path_is_file helper
Author: Junio C Hamano
Date: Thu, 22 Oct 2026 14:48
Date: Thu, 22 Oct 2026 14:48
37 lines
14184 bytes
14184 bytes
Usman Akinyemi <usmanakinyemi202@gmail.com> writes: > On Wed, Oct 21, 2026 at 12:30 PM Joy via GitGitGadget > <gitgitgadget@gmail.com> wrote: >> >> From: Joy Gundu <soniqjjj@gmail.com> >> >> Signed-off-by: Joy Gundu <soniqjjj@gmail.com> >> --- >> t3429: use test_path_is_file helper >> >> Replace test -e F with test_path_is_file F in t3429-rebase-edit-todo.sh >> to use Git's semantic test helper and provide better diagnostics on > Why is the commit message down after the dashes, isn't is supposed to > be at the top? (tip: leave a blank line between what they write and what you write, both before and after) It is a common mistake of GGG users. When they write an empty commit message and then elaborate in the pull request message, we see something like what we are looking at. >> todo=.git/rebase-merge/git-rebase-todo && >> git rebase HEAD~1 -x "echo exec touch F >>$todo" && >> - test -e F >> + test_path_is_file F > This is wrong, the initial patch is testing whether "F" exists, not whether > it is a file. The appropriate function to use here is test_patch_exists. >> ' >> >> test_expect_success 'rebase exec with an empty list does not exec anything' ' >> >> base-commit: c51408889c3b372814bc20b9431c3b74d0d268eb >> -- >> gitgitgadget
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