From: Amanda Shafack <shafack.likhene@xxxxxxxxx> Using the logical not operator on both the git and grep command is redundant, since the main check is done at the level of the grep command. Apply the logical not operator only to the grep command. Co-authored-by: Johannes Schindelin <dscho@xxxxxxxxxx> Signed-off-by: Amanda Shafack <shafack.likhene@xxxxxxxxx> --- t/t2200-add-update.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/t2200-add-update.sh b/t/t2200-add-update.sh index 2d850bb372..7cb7a70382 100755 --- a/t/t2200-add-update.sh +++ b/t/t2200-add-update.sh @@ -179,10 +179,8 @@ test_expect_success 'add -u resolves unmerged paths' ' test_expect_success '"add -u non-existent" should fail' ' test_must_fail git add -u non-existent && - ! ( - git ls-files >actual && - grep "non-existent" actual - ) + git ls-files >actual && + ! grep "non-existent" actual ' test_done -- gitgitgadget