Message ID | pull.1636.git.1704891257544.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | t4129: prevent loss of exit code due to the use of pipes | expand |
"Chandra Pratap via GitGitGadget" <gitgitgadget@gmail.com> writes: > t/t4129-apply-samemode.sh | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Looks good. Will queue with two instances of a minor style fix (see below). > diff --git a/t/t4129-apply-samemode.sh b/t/t4129-apply-samemode.sh > index e7a7295f1b6..ffabeafa213 100755 > --- a/t/t4129-apply-samemode.sh > +++ b/t/t4129-apply-samemode.sh > @@ -41,7 +41,8 @@ test_expect_success FILEMODE 'same mode (index only)' ' > chmod +x file && > git add file && > git apply --cached patch-0.txt && > - git ls-files -s file | grep "^100755" > + git ls-files -s file > ls-files-output && Redirection operator ">" and "<" sticks to the file in question (look for "> " and "< " in this file and you'd find none), i.e. git ls-files -s file >ls-files-output && Thanks.
diff --git a/t/t4129-apply-samemode.sh b/t/t4129-apply-samemode.sh index e7a7295f1b6..ffabeafa213 100755 --- a/t/t4129-apply-samemode.sh +++ b/t/t4129-apply-samemode.sh @@ -41,7 +41,8 @@ test_expect_success FILEMODE 'same mode (index only)' ' chmod +x file && git add file && git apply --cached patch-0.txt && - git ls-files -s file | grep "^100755" + git ls-files -s file > ls-files-output && + test_grep "^100755" ls-files-output ' test_expect_success FILEMODE 'mode update (no index)' ' @@ -60,7 +61,8 @@ test_expect_success FILEMODE 'mode update (with index)' ' test_expect_success FILEMODE 'mode update (index only)' ' git reset --hard && git apply --cached patch-1.txt && - git ls-files -s file | grep "^100755" + git ls-files -s file > ls-files-output && + test_grep "^100755" ls-files-output ' test_expect_success FILEMODE 'empty mode is rejected' '