From: "nsengaw4c via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: nsengaw4c <nsengiyumvawilberforce@gmail.com>,
Nsengiyumva Wilberforce <nsengiyumvawilberforce@gmail.com>
Subject: [PATCH v2] [OUTREACHY] t1002: modernize outdated conditional
Date: Fri, 14 Oct 2022 07:47:27 +0000 [thread overview]
Message-ID: <pull.1362.v2.git.git.1665733647421.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1362.git.git.1665713184304.gitgitgadget@gmail.com>
From: Nsengiyumva Wilberforce <nsengiyumvawilberforce@gmail.com>
Tests in this script use an unusual and hard to reason about
conditional construct
if expression; then false; else :; fi
Change them to use more idiomatic construct:
! expression
Cc: Christian Couder <christian.couder@gmail.com>
Cc: Hariom Verma <hariom18599@gmail.com>
Signed-off-by: Nsengiyumva Wilberfore <nsengiyumvawilberforce@gmail.com>
---
[OUTREACHY]cleaning t1002-read-tree-m-u-2way.sh
This is an update in t1002-read-tree-m-u-2way.sh. all the tests that use
the unusual construct: if read_tree_u_must_succeed -m -u $treeH $treeM;
then false; else :; fi have been updated to ! read_tree_u_must_succeed
-m -u $treeH $treeM "I am an outreachy applicant" CC: Christian Couder
christian.couder@gmail.com, Hariom verma hariom18599@gmail.com
Signed-off-by: wilberforce nsengiyumvawilberforce@gmail.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1362%2Fnsengiyumva-wilberforce%2Ft1002_usual_construct_updated-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1362/nsengiyumva-wilberforce/t1002_usual_construct_updated-v2
Pull-Request: https://github.com/git/git/pull/1362
Range-diff vs v1:
1: b2ed686bc94 ! 1: 8a9cd66d7d9 [OUTREACHY] t1002: modernize outdated conditional
@@
## Metadata ##
-Author: wilberforce <nsengiyumvawilberforce@gmail.com>
+Author: Nsengiyumva Wilberforce <nsengiyumvawilberforce@gmail.com>
## Commit message ##
[OUTREACHY] t1002: modernize outdated conditional
@@ Commit message
Cc: Christian Couder <christian.couder@gmail.com>
Cc: Hariom Verma <hariom18599@gmail.com>
- Signed-off-by: Nsengiyumva wilberfore <nsengiyumvawilberforce@gmail.com>
+ Signed-off-by: Nsengiyumva Wilberfore <nsengiyumvawilberforce@gmail.com>
## t/t1002-read-tree-m-u-2way.sh ##
@@ t/t1002-read-tree-m-u-2way.sh: test_expect_success \
t/t1002-read-tree-m-u-2way.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/t/t1002-read-tree-m-u-2way.sh b/t/t1002-read-tree-m-u-2way.sh
index bd5313caec9..cdc077ce12d 100755
--- a/t/t1002-read-tree-m-u-2way.sh
+++ b/t/t1002-read-tree-m-u-2way.sh
@@ -154,7 +154,7 @@ test_expect_success \
read_tree_u_must_succeed --reset -u $treeH &&
echo frotz frotz >frotz &&
git update-index --add frotz &&
- if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi'
+ ! read_tree_u_must_succeed -m -u $treeH $treeM'
test_expect_success \
'9 - conflicting addition.' \
@@ -163,7 +163,7 @@ test_expect_success \
echo frotz frotz >frotz &&
git update-index --add frotz &&
echo frotz >frotz &&
- if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi'
+ ! read_tree_u_must_succeed -m -u $treeH $treeM'
test_expect_success \
'10 - path removed.' \
@@ -186,7 +186,7 @@ test_expect_success \
echo rezrov >rezrov &&
git update-index --add rezrov &&
echo rezrov rezrov >rezrov &&
- if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi'
+ ! read_tree_u_must_succeed -m -u $treeH $treeM'
test_expect_success \
'12 - unmatching local changes being removed.' \
@@ -194,7 +194,7 @@ test_expect_success \
read_tree_u_must_succeed --reset -u $treeH &&
echo rezrov rezrov >rezrov &&
git update-index --add rezrov &&
- if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi'
+ ! read_tree_u_must_succeed -m -u $treeH $treeM'
test_expect_success \
'13 - unmatching local changes being removed.' \
@@ -203,7 +203,7 @@ test_expect_success \
echo rezrov rezrov >rezrov &&
git update-index --add rezrov &&
echo rezrov >rezrov &&
- if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi'
+ ! read_tree_u_must_succeed -m -u $treeH $treeM'
cat >expected <<EOF
-100644 X 0 nitfol
@@ -251,7 +251,7 @@ test_expect_success \
read_tree_u_must_succeed --reset -u $treeH &&
echo bozbar bozbar >bozbar &&
git update-index --add bozbar &&
- if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi'
+ ! read_tree_u_must_succeed -m -u $treeH $treeM'
test_expect_success \
'17 - conflicting local change.' \
@@ -260,7 +260,7 @@ test_expect_success \
echo bozbar bozbar >bozbar &&
git update-index --add bozbar &&
echo bozbar bozbar bozbar >bozbar &&
- if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi'
+ ! read_tree_u_must_succeed -m -u $treeH $treeM'
test_expect_success \
'18 - local change already having a good result.' \
@@ -316,7 +316,7 @@ test_expect_success \
echo bozbar >bozbar &&
git update-index --add bozbar &&
echo gnusto gnusto >bozbar &&
- if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi'
+ ! read_tree_u_must_succeed -m -u $treeH $treeM'
# Also make sure we did not break DF vs DF/DF case.
test_expect_success \
base-commit: d420dda0576340909c3faff364cfbd1485f70376
--
gitgitgadget
next prev parent reply other threads:[~2022-10-14 7:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 2:06 [PATCH] [OUTREACHY] t1002: modernize outdated conditional nsengaw4c via GitGitGadget
2022-10-14 5:05 ` Junio C Hamano
2022-10-14 7:47 ` nsengaw4c via GitGitGadget [this message]
2022-10-14 8:01 ` [PATCH v3] " nsengaw4c via GitGitGadget
2022-10-14 16:15 ` Junio C Hamano
2022-10-14 16:21 ` Derrick Stolee
2022-10-14 16:58 ` Eric Sunshine
2022-10-14 17:54 ` Derrick Stolee
2022-10-14 18:57 ` Junio C Hamano
2022-10-14 19:06 ` Junio C Hamano
2022-10-14 19:14 ` Eric Sunshine
2022-10-14 20:41 ` Junio C Hamano
2022-10-14 20:19 ` Philip Oakley
2022-10-14 20:42 ` Junio C Hamano
2022-10-14 18:28 ` [PATCH v4] " nsengaw4c via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.1362.v2.git.git.1665733647421.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=nsengiyumvawilberforce@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).