From patchwork Thu Oct 15 17:57:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11839885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E33DC433DF for ; Thu, 15 Oct 2020 17:58:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3239822264 for ; Thu, 15 Oct 2020 17:58:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SJeTymxp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731932AbgJOR6J (ORCPT ); Thu, 15 Oct 2020 13:58:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731897AbgJOR6J (ORCPT ); Thu, 15 Oct 2020 13:58:09 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 824C2C061755 for ; Thu, 15 Oct 2020 10:58:08 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id f5so2393734pgb.1 for ; Thu, 15 Oct 2020 10:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2AiLW3n+qtxgLGmQn50OmEx4DzjvE/QB2JDpIWwXlis=; b=SJeTymxpUF3MzgYHUtAXwr0wx1IGCr6x2bbv4d2xNUC0OZqNXwHhTFemaGX3zWQOcL zyn0+3XY9VetK/42pbLENHoroXCvg/gNEMRQfd6CjXmFiKE9arxuHypNO+ofXW5rG6Z9 XFu0uutuKuTXSaJsbwWMdngFOwKRWTChE1rgD08HSlWoTuIlCn7VI9Ke0sVRp1HRjgDR g7AswizpZTplRB7OG4FvrsGditB5LdEb7BARh7+yTs4vq04XZ0gs6bGGk66m8LsQHE6+ CUoukC3wRY/rD21ZyaHW/w2VnZxCU8TnV9hJUxMV+jS3V/jMu03Sz4IKo29FxonBLxUR YkkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2AiLW3n+qtxgLGmQn50OmEx4DzjvE/QB2JDpIWwXlis=; b=eF7rd4Y4ZdXtUorMtwuHs+PDn8DVlrhEPAyrbZvHmCgKIsGRxK/VMIaRoeLwNcg70b 8SydvtYNebWv8ZPA1ZtmU0DLG+WsxEw5uNdKPyU8KSRvn+GVqQiLsE7Mo++xouNTTXKX oXWWimE353Rk18CucZDEtJcBYRdNnG9kPqltap+0YsYxX4kc2W26ASdBWH6M0Kg3uwXn Xaq/A4EyQJ8s8Wts8wGF46AHpyTO2+ZCf+vGdqLTKTfHH7Pa/lrGzUjgd3P6JeI6YLDv 2IZiLApE+LCqzKhYtqZTcHaHQyhIe9jUnHaV7mEqPgS0C+W/2pBZOO6z3xJ0JLFxwGys KDAg== X-Gm-Message-State: AOAM530XhYWqoRZZQiRe/9OHFODX1Q1CqnTjMgkGl5gAjQyTQ+CuPhCp ThBbotOyn0jSX14wRcFy7+ziCcbgxBU4op0G X-Google-Smtp-Source: ABdhPJxrXxHaGkS1Yo7NWLUGMQCUO4teGnJKSE2ihCc5lA1U6EygWq3u+Psho64MtuiCWhucSHw7FA== X-Received: by 2002:a62:1991:0:b029:155:f476:2462 with SMTP id 139-20020a6219910000b0290155f4762462mr5207915pfz.43.1602784687178; Thu, 15 Oct 2020 10:58:07 -0700 (PDT) Received: from localhost.localdomain ([2405:204:1309:c8:79e1:6677:5d35:9a95]) by smtp.gmail.com with ESMTPSA id n139sm3945930pfd.167.2020.10.15.10.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2020 10:58:06 -0700 (PDT) From: charvi-077 To: git@vger.kernel.org Cc: christian.couder@gmail.com, phillip.wood123@gmail.com, sunshine@sunshineco.com, charvi-077 Subject: [PATCH 1/5][Outreachy] t7101,t7102,t7201: modernize test formatting Date: Thu, 15 Oct 2020 23:27:05 +0530 Message-Id: <20201015175709.20121-2-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201015175709.20121-1-charvi077@gmail.com> References: <20201015175709.20121-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Some tests in this script are formatted using a very old style: test_expect_success \ 'title' \ 'body line 1 && body line 2' Updating the formatting to the modern style: test_expect_success 'title' ' body line 1 && body line 2 ' Signed-off-by: charvi-077 --- t/t7101-reset-empty-subdirs.sh | 66 +++++++++++++++++----------------- t/t7102-reset.sh | 24 +++++-------- t/t7201-co.sh | 31 ++++++++-------- 3 files changed, 56 insertions(+), 65 deletions(-) diff --git a/t/t7101-reset-empty-subdirs.sh b/t/t7101-reset-empty-subdirs.sh index 96e163f084..bfce05ac5d 100755 --- a/t/t7101-reset-empty-subdirs.sh +++ b/t/t7101-reset-empty-subdirs.sh @@ -6,16 +6,15 @@ test_description='git reset should cull empty subdirs' . ./test-lib.sh -test_expect_success \ - 'creating initial files' \ - 'mkdir path0 && +test_expect_success 'creating initial files' ' + mkdir path0 && cp "$TEST_DIRECTORY"/../COPYING path0/COPYING && git add path0/COPYING && - git commit -m add -a' + git commit -m add -a +' -test_expect_success \ - 'creating second files' \ - 'mkdir path1 && +test_expect_success 'creating second files' ' + mkdir path1 && mkdir path1/path2 && cp "$TEST_DIRECTORY"/../COPYING path1/path2/COPYING && cp "$TEST_DIRECTORY"/../COPYING path1/COPYING && @@ -25,39 +24,40 @@ test_expect_success \ git add path1/COPYING && git add COPYING && git add path0/COPYING-TOO && - git commit -m change -a' + git commit -m change -a +' -test_expect_success \ - 'resetting tree HEAD^' \ - 'git reset --hard HEAD^' +test_expect_success 'resetting tree HEAD^' ' + git reset --hard HEAD^ +' -test_expect_success \ - 'checking initial files exist after rewind' \ - 'test -d path0 && - test -f path0/COPYING' +test_expect_success 'checking initial files exist after rewind' ' + test -d path0 && + test -f path0/COPYING +' -test_expect_success \ - 'checking lack of path1/path2/COPYING' \ - '! test -f path1/path2/COPYING' +test_expect_success 'checking lack of path1/path2/COPYING' ' + ! test -f path1/path2/COPYING +' -test_expect_success \ - 'checking lack of path1/COPYING' \ - '! test -f path1/COPYING' +test_expect_success 'checking lack of path1/COPYING' ' + ! test -f path1/COPYING +' -test_expect_success \ - 'checking lack of COPYING' \ - '! test -f COPYING' +test_expect_success 'checking lack of COPYING' ' + ! test -f COPYING +' -test_expect_success \ - 'checking checking lack of path1/COPYING-TOO' \ - '! test -f path0/COPYING-TOO' +test_expect_success 'checking checking lack of path1/COPYING-TOO' ' + ! test -f path0/COPYING-TOO +' -test_expect_success \ - 'checking lack of path1/path2' \ - '! test -d path1/path2' +test_expect_success 'checking lack of path1/path2' ' + ! test -d path1/path2 +' -test_expect_success \ - 'checking lack of path1' \ - '! test -d path1' +test_expect_success 'checking lack of path1' ' + ! test -d path1 +' test_done diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index 22161b3b2d..fe43f77513 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -107,8 +107,7 @@ test_expect_success 'reset --soft with unmerged index should fail' ' git rm --cached -- un ' -test_expect_success \ - 'giving paths with options different than --mixed should fail' ' +test_expect_success 'giving paths with options different than --mixed should fail' ' test_must_fail git reset --soft -- first && test_must_fail git reset --hard -- first && test_must_fail git reset --soft HEAD^ -- first && @@ -128,8 +127,7 @@ test_expect_success 'giving unrecognized options should fail' ' check_changes $head5 ' -test_expect_success \ - 'trying to do reset --soft with pending merge should fail' ' +test_expect_success 'trying to do reset --soft with pending merge should fail' ' git branch branch1 && git branch branch2 && @@ -152,8 +150,7 @@ test_expect_success \ check_changes $head5 ' -test_expect_success \ - 'trying to do reset --soft with pending checkout merge should fail' ' +test_expect_success 'trying to do reset --soft with pending checkout merge should fail' ' git branch branch3 && git branch branch4 && @@ -175,8 +172,7 @@ test_expect_success \ check_changes $head5 ' -test_expect_success \ - 'resetting to HEAD with no changes should succeed and do nothing' ' +test_expect_success 'resetting to HEAD with no changes should succeed and do nothing' ' git reset --hard && check_changes $head5 && git reset --hard HEAD && @@ -226,8 +222,7 @@ secondfile: 2nd line 2nd file 3rd line 2nd file EOF -test_expect_success \ - 'changing files and redo the last commit should succeed' ' +test_expect_success 'changing files and redo the last commit should succeed' ' echo "3rd line 2nd file" >>secondfile && git commit -a -C ORIG_HEAD && head4=$(git rev-parse --verify HEAD) && @@ -245,8 +240,7 @@ first: second: 2nd file EOF -test_expect_success \ - '--hard reset should change the files and undo commits permanently' ' +test_expect_success '--hard reset should change the files and undo commits permanently' ' git reset --hard HEAD~2 && check_changes $head5p2 && test "$(git rev-parse ORIG_HEAD)" = \ @@ -284,8 +278,7 @@ secondfile: 1st line 2nd file 2nd line 2nd file EOF -test_expect_success \ - 'redoing changes adding them without commit them should succeed' ' +test_expect_success 'redoing changes adding them without commit them should succeed' ' git rm first && git mv second secondfile && @@ -380,8 +373,7 @@ secondfile: 1st line 2nd file 2nd line 2nd file EOF -test_expect_success \ - '--hard reset to ORIG_HEAD should clear a fast-forward merge' ' +test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge' ' git reset --hard HEAD^ && check_changes $head5 && diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 4d62b9b00f..a800bda5e3 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -62,7 +62,7 @@ test_expect_success setup ' git checkout master ' -test_expect_success "checkout from non-existing branch" ' +test_expect_success 'checkout from non-existing branch' ' git checkout -b delete-me master && git update-ref -d --no-deref refs/heads/delete-me && @@ -71,7 +71,7 @@ test_expect_success "checkout from non-existing branch" ' test refs/heads/master = "$(git symbolic-ref HEAD)" ' -test_expect_success "checkout with dirty tree without -m" ' +test_expect_success 'checkout with dirty tree without -m' ' fill 0 1 2 3 4 5 6 7 8 >one && if git checkout side @@ -84,7 +84,7 @@ test_expect_success "checkout with dirty tree without -m" ' ' -test_expect_success "checkout with unrelated dirty tree without -m" ' +test_expect_success 'checkout with unrelated dirty tree without -m' ' git checkout -f master && fill 0 1 2 3 4 5 6 7 8 >same && @@ -95,7 +95,7 @@ test_expect_success "checkout with unrelated dirty tree without -m" ' test_cmp messages.expect messages ' -test_expect_success "checkout -m with dirty tree" ' +test_expect_success 'checkout -m with dirty tree' ' git checkout -f master && git clean -f && @@ -120,7 +120,7 @@ test_expect_success "checkout -m with dirty tree" ' test_must_be_empty current.index ' -test_expect_success "checkout -m with dirty tree, renamed" ' +test_expect_success 'checkout -m with dirty tree, renamed' ' git checkout -f master && git clean -f && @@ -388,22 +388,22 @@ test_expect_success 'checkout specific path while in subdirectory' ' ' -test_expect_success \ - 'checkout w/--track sets up tracking' ' +test_expect_success 'checkout w/--track sets up tracking' ' git config branch.autosetupmerge false && git checkout master && git checkout --track -b track1 && test "$(git config branch.track1.remote)" && - test "$(git config branch.track1.merge)"' + test "$(git config branch.track1.merge)" +' -test_expect_success \ - 'checkout w/autosetupmerge=always sets up tracking' ' +test_expect_success 'checkout w/autosetupmerge=always sets up tracking' ' test_when_finished git config branch.autosetupmerge false && git config branch.autosetupmerge always && git checkout master && git checkout -b track2 && test "$(git config branch.track2.remote)" && - test "$(git config branch.track2.merge)"' + test "$(git config branch.track2.merge)" +' test_expect_success 'checkout w/--track from non-branch HEAD fails' ' git checkout master^0 && @@ -435,8 +435,7 @@ test_expect_success 'detach a symbolic link HEAD' ' test "z$(git rev-parse --verify refs/heads/master)" = "z$here" ' -test_expect_success \ - 'checkout with --track fakes a sensible -b ' ' +test_expect_success 'checkout with --track fakes a sensible -b ' ' git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git update-ref refs/remotes/origin/koala/bear renamer && @@ -457,9 +456,9 @@ test_expect_success \ test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" ' -test_expect_success \ - 'checkout with --track, but without -b, fails with too short tracked name' ' - test_must_fail git checkout --track renamer' +test_expect_success 'checkout with --track, but without -b, fails with too short tracked name' ' + test_must_fail git checkout --track renamer +' setup_conflicting_index () { rm -f .git/index && From patchwork Thu Oct 15 17:57:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11839887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C3A0C433DF for ; Thu, 15 Oct 2020 17:58:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9EFF22263 for ; Thu, 15 Oct 2020 17:58:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RnU0OyGn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731997AbgJOR6P (ORCPT ); Thu, 15 Oct 2020 13:58:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731881AbgJOR6O (ORCPT ); Thu, 15 Oct 2020 13:58:14 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3818C061755 for ; Thu, 15 Oct 2020 10:58:14 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id f19so2463029pfj.11 for ; Thu, 15 Oct 2020 10:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ExaENDTxxzNqbrZgVFiEoUlckUZQ03w781uuK7Ti//Y=; b=RnU0OyGnPZBS6Pu4K2icDIEqaUG8X2Ua2fnJMfYogIGuLKOwdOF9PS6dUrd1Xd/Z1X +hA6easSphiGidYIYD9k+Y/DPKDM8L18ZC8pqdPfVulpH9UUgi0lav6wwEbGBdiKNSu1 7iR3MdP7kCCUhFNk/1KdW7JynK1kpY/3Y/GJMnQcTOGD6uuw43xQXfXQ4gcYntm1/zep 4EQchCecQgBKqjCfknG4LqxfjBIaatqCRgr7KFUwjGo3kfNvfMBa6sENaAWc9gMhixVD 5X/PO7tsHfO2cTnbhwYUDT4nuQzjWykN6gz//gFoAVq8p6uI5GsZZL08T3TZm0JMgkGj uIuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ExaENDTxxzNqbrZgVFiEoUlckUZQ03w781uuK7Ti//Y=; b=rs2McNbM9fw8vysxfCl2yJMoJAUhNQIbDAG0doCFBQf6e818MBgBARaoPfFHnduqOZ R2AAanx9bl+tYThGOkR1GCsaOb+txdeWM2OLMkcBnAbzTWolZUq6WK/clzO0HkTFrBeX FU4JL44n50zJ2S3Y5flwryQQUFruB2OjNhDJLzqJDlV4sEVVLQZDx13x97TCjlOTJglD eHvxOEyzVRw2DULTZ92k8BxuSurhykarxG9IyDa8m42y8towtO6Y9Hlx/a0pcYvzk4h5 wxngX8VoWUtmlQ0yKn+kRvlH7JrT0LSWq6QaAaRkbQiRolnTEsPwGoqMvh48kEo+cJlD OF/w== X-Gm-Message-State: AOAM530UEc0fgmnuLtAoggUa27DoznBekeqUJ/PFfPwoD0H+Ss26Zkce FWwcwLvcigOvlRitE/Qwj3J1AJEgaWfXOkqD X-Google-Smtp-Source: ABdhPJzrCDRbH6goA1CJUd0D1CxLGGvHm6i2C2Haq34rG2lsj+FsHqofIdeIKIlTSz+2JPYhD8I5WQ== X-Received: by 2002:a63:1b54:: with SMTP id b20mr26247pgm.161.1602784693934; Thu, 15 Oct 2020 10:58:13 -0700 (PDT) Received: from localhost.localdomain ([2405:204:1309:c8:79e1:6677:5d35:9a95]) by smtp.gmail.com with ESMTPSA id n139sm3945930pfd.167.2020.10.15.10.58.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2020 10:58:13 -0700 (PDT) From: charvi-077 To: git@vger.kernel.org Cc: christian.couder@gmail.com, phillip.wood123@gmail.com, sunshine@sunshineco.com, charvi-077 Subject: [PATCH 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body Date: Thu, 15 Oct 2020 23:27:06 +0530 Message-Id: <20201015175709.20121-3-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201015175709.20121-1-charvi077@gmail.com> References: <20201015175709.20121-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Some tests use a deprecated style in which there are unnecessary blank lines after the opening quote of the test body and before the closing quote. So we should removed these unnecessary blank lines. Signed-off-by: charvi-077 --- t/t7102-reset.sh | 9 --------- t/t7201-co.sh | 25 ------------------------- 2 files changed, 34 deletions(-) diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index fe43f77513..2b4cfb2c83 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -439,7 +439,6 @@ test_expect_success 'test --mixed ' ' ' test_expect_success 'test resetting the index at give paths' ' - mkdir sub && >sub/file1 && >sub/file2 && @@ -452,7 +451,6 @@ test_expect_success 'test resetting the index at give paths' ' echo "$U" && test_must_fail git diff-index --cached --exit-code "$T" && test "$T" != "$U" - ' test_expect_success 'resetting an unmodified path is a no-op' ' @@ -490,7 +488,6 @@ test_expect_success 'resetting specific path that is unmerged' ' ' test_expect_success 'disambiguation (1)' ' - git reset --hard && >secondfile && git add secondfile && @@ -499,11 +496,9 @@ test_expect_success 'disambiguation (1)' ' test -z "$(git diff --cached --name-only)" && test -f secondfile && test_must_be_empty secondfile - ' test_expect_success 'disambiguation (2)' ' - git reset --hard && >secondfile && git add secondfile && @@ -511,11 +506,9 @@ test_expect_success 'disambiguation (2)' ' test_must_fail git reset secondfile && test -n "$(git diff --cached --name-only -- secondfile)" && test ! -f secondfile - ' test_expect_success 'disambiguation (3)' ' - git reset --hard && >secondfile && git add secondfile && @@ -524,11 +517,9 @@ test_expect_success 'disambiguation (3)' ' test_must_fail git diff --quiet && test -z "$(git diff --cached --name-only)" && test ! -f secondfile - ' test_expect_success 'disambiguation (4)' ' - git reset --hard && >secondfile && git add secondfile && diff --git a/t/t7201-co.sh b/t/t7201-co.sh index a800bda5e3..b527f8009c 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -33,7 +33,6 @@ fill () { test_expect_success setup ' - fill x y z > same && fill 1 2 3 4 5 6 7 8 >one && fill a b c d e >two && @@ -63,7 +62,6 @@ test_expect_success setup ' ' test_expect_success 'checkout from non-existing branch' ' - git checkout -b delete-me master && git update-ref -d --no-deref refs/heads/delete-me && test refs/heads/delete-me = "$(git symbolic-ref HEAD)" && @@ -72,7 +70,6 @@ test_expect_success 'checkout from non-existing branch' ' ' test_expect_success 'checkout with dirty tree without -m' ' - fill 0 1 2 3 4 5 6 7 8 >one && if git checkout side then @@ -81,11 +78,9 @@ test_expect_success 'checkout with dirty tree without -m' ' else echo "happy - failed correctly" fi - ' test_expect_success 'checkout with unrelated dirty tree without -m' ' - git checkout -f master && fill 0 1 2 3 4 5 6 7 8 >same && cp same kept && @@ -96,7 +91,6 @@ test_expect_success 'checkout with unrelated dirty tree without -m' ' ' test_expect_success 'checkout -m with dirty tree' ' - git checkout -f master && git clean -f && @@ -121,7 +115,6 @@ test_expect_success 'checkout -m with dirty tree' ' ' test_expect_success 'checkout -m with dirty tree, renamed' ' - git checkout -f master && git clean -f && fill 1 2 3 4 5 7 8 >one && @@ -139,11 +132,9 @@ test_expect_success 'checkout -m with dirty tree, renamed' ' ! test -f one && git diff --cached >current && test_must_be_empty current - ' test_expect_success 'checkout -m with merge conflict' ' - git checkout -f master && git clean -f && fill 1 T 3 4 5 6 S 8 >one && @@ -166,7 +157,6 @@ test_expect_success 'checkout -m with merge conflict' ' ' test_expect_success 'format of merge conflict from checkout -m' ' - git checkout -f master && git clean -f && fill b d > two && @@ -190,7 +180,6 @@ test_expect_success 'format of merge conflict from checkout -m' ' ' test_expect_success 'checkout --merge --conflict=diff3 ' ' - git checkout -f master && git reset --hard && git clean -f && fill b d > two && @@ -216,7 +205,6 @@ test_expect_success 'checkout --merge --conflict=diff3 ' ' ' test_expect_success 'switch to another branch while carrying a deletion' ' - git checkout -f master && git reset --hard && git clean -f && git rm two && @@ -228,7 +216,6 @@ test_expect_success 'switch to another branch while carrying a deletion' ' ' test_expect_success 'checkout to detach HEAD (with advice declined)' ' - git config advice.detachedHead false && rev=$(git rev-parse --short renamer^) && git checkout -f renamer && git clean -f && @@ -267,7 +254,6 @@ test_expect_success 'checkout to detach HEAD' ' ' test_expect_success 'checkout to detach HEAD with branchname^' ' - git checkout -f master && git clean -f && git checkout renamer^ && H=$(git rev-parse --verify HEAD) && @@ -283,7 +269,6 @@ test_expect_success 'checkout to detach HEAD with branchname^' ' ' test_expect_success 'checkout to detach HEAD with :/message' ' - git checkout -f master && git clean -f && git checkout ":/Initial" && H=$(git rev-parse --verify HEAD) && @@ -299,7 +284,6 @@ test_expect_success 'checkout to detach HEAD with :/message' ' ' test_expect_success 'checkout to detach HEAD with HEAD^0' ' - git checkout -f master && git clean -f && git checkout HEAD^0 && H=$(git rev-parse --verify HEAD) && @@ -315,7 +299,6 @@ test_expect_success 'checkout to detach HEAD with HEAD^0' ' ' test_expect_success 'checkout with ambiguous tag/branch names' ' - git tag both side && git branch both master && git reset --hard && @@ -327,11 +310,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' ' test "z$H" = "z$M" && name=$(git symbolic-ref HEAD 2>/dev/null) && test "z$name" = zrefs/heads/both - ' test_expect_success 'checkout with ambiguous tag/branch names' ' - git reset --hard && git checkout master && @@ -351,11 +332,9 @@ test_expect_success 'checkout with ambiguous tag/branch names' ' else : happy fi - ' test_expect_success 'switch branches while in subdirectory' ' - git reset --hard && git checkout master && @@ -366,11 +345,9 @@ test_expect_success 'switch branches while in subdirectory' ' ) && ! test -f subs/one && rm -fr subs - ' test_expect_success 'checkout specific path while in subdirectory' ' - git reset --hard && git checkout side && mkdir subs && @@ -385,7 +362,6 @@ test_expect_success 'checkout specific path while in subdirectory' ' git checkout side -- bero ) && test -f subs/bero - ' test_expect_success 'checkout w/--track sets up tracking' ' @@ -608,7 +584,6 @@ test_expect_success 'failing checkout -b should not break working tree' ' test $(git symbolic-ref HEAD) = refs/heads/master && git diff --exit-code && git diff --cached --exit-code - ' test_expect_success 'switch out of non-branch' ' From patchwork Thu Oct 15 17:57:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11839891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B0CEC43457 for ; Thu, 15 Oct 2020 17:58:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09EEA22261 for ; Thu, 15 Oct 2020 17:58:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I+GmkN9j" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731805AbgJOR6Z (ORCPT ); Thu, 15 Oct 2020 13:58:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730574AbgJOR6T (ORCPT ); Thu, 15 Oct 2020 13:58:19 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC68FC061755 for ; Thu, 15 Oct 2020 10:58:18 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id y1so2024707plp.6 for ; Thu, 15 Oct 2020 10:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=77IOcX7TntEQz1EZOENIL5Guj44tdQ8HVMocOOKQpCA=; b=I+GmkN9j+PdNDTRRKjIzTC8VuPzQYluR4ef/XYGOt7uoC2nQnfwf7ub0d0foMnGaoZ v1XcCUp15Z70StQHo59hKCrsbQBegoJ3yI2QKpduROw5b1U2gUomiz7K7dgBSuw60VO2 QQfNtzS8ZQa7xgj09kyioIsHz2hfjoxrfGoFb4/ivsXGzzlDAaZYsqhvySL99dtxVFr/ DP1jzc5BY/+2pigC/GtemsI2isX118LlOXQzIfHD2Gd2C/OTv5n70Q0mqPVKbRfIytrN +TG1qaarHFnCZYoXOQ1evTUvOU/BuJTyfVz6+4m+Xr3IbWBsf9HRch5DNOztcqULKQAL RcFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=77IOcX7TntEQz1EZOENIL5Guj44tdQ8HVMocOOKQpCA=; b=ZfqWL+rWDa9WGLYdEQlyWXCCLWDJ8hjCf18WIkQBuRoKbG3/VkxY3JBlxul9TWYHq1 Y0sjshf9fCTxugoYoTG36I79+5ODlr1kM0ww7O+iappV18Qa2x8ppT+8aeKpG3R4XsNF 3DyFzOPp0tofZo/n4V1ai+ukEJA7jgIhF5m2CeOHfYbNaXMMARv6wSQ/Z9u9r9mOsOnl nTjQAX3H8P67qNap34YikG8+UZG9mhtN8UHlL1MmWnSgZYCPNlo6uBM7KXbO6V090aYZ n6qeibtkyZf9kUvr7zCv7eJ5INlkvquer7L95P/rVZK1MGr283A1bM7Q7J9Am0unMN3f 0R/Q== X-Gm-Message-State: AOAM532NqAl9tONoAGnpUrqX0ApUbNcS+J0BCP7HEnqXWxePp7zLhPrl 0i0b0uz1/dssUz/cPlIJqkis9uhKVyou0Dbq X-Google-Smtp-Source: ABdhPJxHJAAf+Mi7RurcFxk5P1wSEFwhuq3FM1yB2ajRzDhPMjRnc6rZ1Cl0Z70xqjFLKrZ+got7Rw== X-Received: by 2002:a17:90a:ec13:: with SMTP id l19mr40485pjy.51.1602784698124; Thu, 15 Oct 2020 10:58:18 -0700 (PDT) Received: from localhost.localdomain ([2405:204:1309:c8:79e1:6677:5d35:9a95]) by smtp.gmail.com with ESMTPSA id n139sm3945930pfd.167.2020.10.15.10.58.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2020 10:58:17 -0700 (PDT) From: charvi-077 To: git@vger.kernel.org Cc: christian.couder@gmail.com, phillip.wood123@gmail.com, sunshine@sunshineco.com, charvi-077 Subject: [PATCH 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator Date: Thu, 15 Oct 2020 23:27:07 +0530 Message-Id: <20201015175709.20121-4-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201015175709.20121-1-charvi077@gmail.com> References: <20201015175709.20121-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org According to Documentation/CodingGuidelines, there should be no whitespace after redirect operators. So, we should remove these whitespaces after redirect operators. Signed-off-by: charvi-077 --- t/t7102-reset.sh | 30 +++++++++++++++--------------- t/t7201-co.sh | 10 +++++----- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index 2b4cfb2c83..a8c96bf162 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -70,15 +70,15 @@ check_changes () { test_expect_success 'reset --hard message' ' hex=$(git log -1 --format="%h") && - git reset --hard > .actual && - echo HEAD is now at $hex $(commit_msg) > .expected && + git reset --hard >.actual && + echo HEAD is now at $hex $(commit_msg) >.expected && test_i18ncmp .expected .actual ' test_expect_success 'reset --hard message (ISO8859-1 logoutputencoding)' ' hex=$(git log -1 --format="%h") && - git -c "i18n.logOutputEncoding=$test_encoding" reset --hard > .actual && - echo HEAD is now at $hex $(commit_msg $test_encoding) > .expected && + git -c "i18n.logOutputEncoding=$test_encoding" reset --hard >.actual && + echo HEAD is now at $hex $(commit_msg $test_encoding) >.expected && test_i18ncmp .expected .actual ' @@ -387,25 +387,25 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge ' test_expect_success 'test --mixed ' ' - echo 1 > file1 && - echo 2 > file2 && + echo 1 >file1 && + echo 2 >file2 && git add file1 file2 && test_tick && git commit -m files && before1=$(git rev-parse --short HEAD:file1) && before2=$(git rev-parse --short HEAD:file2) && git rm file2 && - echo 3 > file3 && - echo 4 > file4 && - echo 5 > file1 && + echo 3 >file3 && + echo 4 >file4 && + echo 5 >file1 && after1=$(git rev-parse --short $(git hash-object file1)) && after4=$(git rev-parse --short $(git hash-object file4)) && git add file1 file3 file4 && git reset HEAD -- file1 file2 file3 && test_must_fail git diff --quiet && - git diff > output && + git diff >output && - cat > expect <<-EOF && + cat >expect <<-EOF && diff --git a/file1 b/file1 index $before1..$after1 100644 --- a/file1 @@ -423,9 +423,9 @@ test_expect_success 'test --mixed ' ' EOF test_cmp expect output && - git diff --cached > output && + git diff --cached >output && - cat > cached_expect <<-EOF && + cat >cached_expect <<-EOF && diff --git a/file4 b/file4 new file mode 100644 index 0000000..$after4 @@ -460,14 +460,14 @@ test_expect_success 'resetting an unmodified path is a no-op' ' git diff-index --cached --exit-code HEAD ' -cat > expect << EOF +cat >expect << EOF Unstaged changes after reset: M file2 EOF test_expect_success '--mixed refreshes the index' ' echo 123 >> file2 && - git reset --mixed HEAD > output && + git reset --mixed HEAD >output && test_i18ncmp expect output ' diff --git a/t/t7201-co.sh b/t/t7201-co.sh index b527f8009c..74553f991b 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -33,7 +33,7 @@ fill () { test_expect_success setup ' - fill x y z > same && + fill x y z >same && fill 1 2 3 4 5 6 7 8 >one && fill a b c d e >two && git add same one two && @@ -55,7 +55,7 @@ test_expect_success setup ' git checkout -b simple master && rm -f one && - fill a c e > two && + fill a c e >two && git commit -a -m "Simple D one, M two" && git checkout master @@ -95,7 +95,7 @@ test_expect_success 'checkout -m with dirty tree' ' git clean -f && fill 0 1 2 3 4 5 6 7 8 >one && - git checkout -m side > messages && + git checkout -m side >messages && test "$(git symbolic-ref HEAD)" = "refs/heads/side" && @@ -159,7 +159,7 @@ test_expect_success 'checkout -m with merge conflict' ' test_expect_success 'format of merge conflict from checkout -m' ' git checkout -f master && git clean -f && - fill b d > two && + fill b d >two && git checkout -m simple && git ls-files >current && @@ -182,7 +182,7 @@ test_expect_success 'format of merge conflict from checkout -m' ' test_expect_success 'checkout --merge --conflict=diff3 ' ' git checkout -f master && git reset --hard && git clean -f && - fill b d > two && + fill b d >two && git checkout --merge --conflict=diff3 simple && cat <<-EOF >expect && From patchwork Thu Oct 15 17:57:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11839893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 746B6C433E7 for ; Thu, 15 Oct 2020 17:58:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 182F4222B9 for ; Thu, 15 Oct 2020 17:58:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nNOpgYvA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732101AbgJOR62 (ORCPT ); Thu, 15 Oct 2020 13:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732090AbgJOR61 (ORCPT ); Thu, 15 Oct 2020 13:58:27 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 910A5C061755 for ; Thu, 15 Oct 2020 10:58:27 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id e7so2462155pfn.12 for ; Thu, 15 Oct 2020 10:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mmNXwb8J6XiQFPGN+D3gkqMmM6uCD5goLuOEdfR3pT4=; b=nNOpgYvA1hcK99qhGXrt1wMHkclIkhQ8LhMZP8qRf+QWo43bTIM3RWZfMFjphq6VeZ ykq9i5g+gOb8SqBgS79VCCVgTPXr4HRc75ltaoqjhpyo/0I0LZEMNGZbI9IgjjAojXsf 3TAGNrF3CDT1tuQq63t84MnCdohsoeNokladeVhxlFi+xZqfxMxQNTMDFyIIDKN5xv4y c7JwqjkNoRjBopTdJ/ykFFYai7/2Y/og5vlu0PvtJgPTkuxC8Cw+FiUHV7Sfun/TzPmW tBFqbwuCA0RDLbA5P3cMtE+cyfBx/a0+61YJG9+vLI2v5Kz2yyHE9fuNYOcBDh14qKrq OYXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mmNXwb8J6XiQFPGN+D3gkqMmM6uCD5goLuOEdfR3pT4=; b=nV5O3DnjcFRIKoFgpwKyX8g4GNFNeJIjd7ow6spaCWINjf3AGzTn51wQe6WHFTtRS5 Fq4vNG0PiwlBgRfCgt3PRDOTP3+WZ0PeVqhkBRaH9yGWkqFgVkYhOmf95ExeBRjTwPAu 0bMCwudqywsixDTI75UEsZX+pG3UiWltxqr7lxhI3Sukfm0rimmPe+InFeukV7ZugF8/ ipqDl8SEF16fAFBSWrdnnuHr64LwBPJOpBl0DzB8thHcND+mXFXVgUEr3grBYpz4CpEP dnim57DzOb5QH2S95f4BlyL8GeslK5l1cZXs/dPhWYG36VWuFQLnUcEjxP0COMq4yJ/A R8cg== X-Gm-Message-State: AOAM531L1rSRJW90VmCsvxE0h0UGk3Tc5Cgy5JFOAmjvbmq8sViL+SLG VdSk6jhXSEKwMuaS1GvrTjAB7G0JocTvys3X X-Google-Smtp-Source: ABdhPJyEWL4CahRW37wcLQnraUqzBVhcIaj6y4Gpg8p7vxr2g3Cwz56lOUik9ZLP0JkkGLLQmSHQUw== X-Received: by 2002:aa7:864a:0:b029:158:e6ba:5548 with SMTP id a10-20020aa7864a0000b0290158e6ba5548mr2383782pfo.1.1602784706983; Thu, 15 Oct 2020 10:58:26 -0700 (PDT) Received: from localhost.localdomain ([2405:204:1309:c8:79e1:6677:5d35:9a95]) by smtp.gmail.com with ESMTPSA id n139sm3945930pfd.167.2020.10.15.10.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2020 10:58:26 -0700 (PDT) From: charvi-077 To: git@vger.kernel.org Cc: christian.couder@gmail.com, phillip.wood123@gmail.com, sunshine@sunshineco.com, charvi-077 Subject: [PATCH 4/5][Outreachy] t7201: avoid using cd outside of subshells Date: Thu, 15 Oct 2020 23:27:08 +0530 Message-Id: <20201015175709.20121-5-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201015175709.20121-1-charvi077@gmail.com> References: <20201015175709.20121-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Avoid using `cd` outside of subshells since, if the test fails, there is no guarantee that the current working directory is the expected one, which may cause subsequent tests to run in the wrong directory. Signed-off-by: charvi-077 --- t/t7201-co.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 74553f991b..5898182fd2 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -339,10 +339,7 @@ test_expect_success 'switch branches while in subdirectory' ' git checkout master && mkdir subs && - ( - cd subs && - git checkout side - ) && + git -C subs checkout side && ! test -f subs/one && rm -fr subs ' @@ -357,10 +354,7 @@ test_expect_success 'checkout specific path while in subdirectory' ' git checkout master && mkdir -p subs && - ( - cd subs && - git checkout side -- bero - ) && + git -C subs checkout side -- bero && test -f subs/bero ' From patchwork Thu Oct 15 17:57:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11839895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAA56C433DF for ; Thu, 15 Oct 2020 17:58:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79DB622263 for ; Thu, 15 Oct 2020 17:58:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lVamwvnX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390681AbgJOR6h (ORCPT ); Thu, 15 Oct 2020 13:58:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388468AbgJOR6c (ORCPT ); Thu, 15 Oct 2020 13:58:32 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15306C061755 for ; Thu, 15 Oct 2020 10:58:32 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id p11so2030342pld.5 for ; Thu, 15 Oct 2020 10:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Jf6MzmauecmMAGvlhgLkJUJ1LHylOTi1Hh+wBxlkTMY=; b=lVamwvnX/zv+G7iR6HLPBZbPnlOwtZ9aytiINb2suBn/F1NN62jTU1k3qf7bGNDm6K x1hyMKXHGGEdMPoeClYkk0+J8lDMGkfiY57MXbgI1b/sZgrkH6xhGT4LGRN/2gDGz+im qTzwuidlxkpgGEpSNdJoOYRFjCXQGlxHEemKnKONyMWlz7YmBVS/AeuTrpklR1Mwi08L PUmrJyOoN/POXO+cPfWdrdvV6gkOttKYkrcSxqwAS0AcDX0gogwQvC/IkVQWg7sgoTH7 nyA3F9rV66qon8eGsrJ2SqSmI4069rqoyLPwJWygrznYtCLysFR9NERru2eUIdBWSukF H0EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Jf6MzmauecmMAGvlhgLkJUJ1LHylOTi1Hh+wBxlkTMY=; b=S++1pwlb6LuGw2bBSWOb2dlS0HqpMkk5QKuGU8QuEnMXiEE+DfaIut2BPCYBg1cbQV 5EmlMM2/a0dbeWS77DV7Uk1udm2HmIn2msApNjdp82C4gvC0OrQ9TQLYpIVUIbJ4ejDM ZQh5ihzBaipisma5/CoYSx5olIq21lNRbVfSiEYos+4GcwUkLNxSSKXKOgYeTSyDlAAn 9goa/B8wsMPZaFN2lh2IuzJyubMCzRuMf8BrlF9lcCVZjHOqcS4ryeH7Dm+fMk9SM7tt dkiS4fu2HMz4tnz9w5w3qa/vYf4320/eYClzvkTUUPp82UodTI5TN4oN91oEaN1ZiatS 4IIw== X-Gm-Message-State: AOAM533TOdwJe3Ij3JDKgRsEuLbkZZ6qCOohtOpQ6+CJrctTqYBW2jUf +MrC/rBx8DHfsNC4IKdZwjjMy2NGBbI9M3+E X-Google-Smtp-Source: ABdhPJy0kDTNtmDH01mIAnzE4k/1CGYDW2qsneABS0sLtj9FLCL2zKBFK9yvCJwpY3WSQO8POMUIxQ== X-Received: by 2002:a17:90a:c68e:: with SMTP id n14mr57648pjt.158.1602784711434; Thu, 15 Oct 2020 10:58:31 -0700 (PDT) Received: from localhost.localdomain ([2405:204:1309:c8:79e1:6677:5d35:9a95]) by smtp.gmail.com with ESMTPSA id n139sm3945930pfd.167.2020.10.15.10.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2020 10:58:31 -0700 (PDT) From: charvi-077 To: git@vger.kernel.org Cc: christian.couder@gmail.com, phillip.wood123@gmail.com, sunshine@sunshineco.com, charvi-077 Subject: [PATCH 5/5][Outreachy] t7201: place each command in its own line Date: Thu, 15 Oct 2020 23:27:09 +0530 Message-Id: <20201015175709.20121-6-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201015175709.20121-1-charvi077@gmail.com> References: <20201015175709.20121-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Multiple commands on one line should be split across multiple lines. Signed-off-by: charvi-077 --- t/t7201-co.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 5898182fd2..b36a93056f 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -157,7 +157,8 @@ test_expect_success 'checkout -m with merge conflict' ' ' test_expect_success 'format of merge conflict from checkout -m' ' - git checkout -f master && git clean -f && + git checkout -f master && + git clean -f && fill b d >two && git checkout -m simple && @@ -180,7 +181,9 @@ test_expect_success 'format of merge conflict from checkout -m' ' ' test_expect_success 'checkout --merge --conflict=diff3 ' ' - git checkout -f master && git reset --hard && git clean -f && + git checkout -f master && + git reset --hard && + git clean -f && fill b d >two && git checkout --merge --conflict=diff3 simple && @@ -205,7 +208,9 @@ test_expect_success 'checkout --merge --conflict=diff3 ' ' ' test_expect_success 'switch to another branch while carrying a deletion' ' - git checkout -f master && git reset --hard && git clean -f && + git checkout -f master && + git reset --hard && + git clean -f && git rm two && test_must_fail git checkout simple 2>errs && @@ -218,7 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' ' test_expect_success 'checkout to detach HEAD (with advice declined)' ' git config advice.detachedHead false && rev=$(git rev-parse --short renamer^) && - git checkout -f renamer && git clean -f && + git checkout -f renamer && + git clean -f && git checkout renamer^ 2>messages && test_i18ngrep "HEAD is now at $rev" messages && test_line_count = 1 messages && @@ -237,7 +243,8 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' ' test_expect_success 'checkout to detach HEAD' ' git config advice.detachedHead true && rev=$(git rev-parse --short renamer^) && - git checkout -f renamer && git clean -f && + git checkout -f renamer && + git clean -f && GIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages && grep "HEAD is now at $rev" messages && test_line_count -gt 1 messages && @@ -254,7 +261,8 @@ test_expect_success 'checkout to detach HEAD' ' ' test_expect_success 'checkout to detach HEAD with branchname^' ' - git checkout -f master && git clean -f && + git checkout -f master && + git clean -f && git checkout renamer^ && H=$(git rev-parse --verify HEAD) && M=$(git show-ref -s --verify refs/heads/master) && @@ -269,7 +277,8 @@ test_expect_success 'checkout to detach HEAD with branchname^' ' ' test_expect_success 'checkout to detach HEAD with :/message' ' - git checkout -f master && git clean -f && + git checkout -f master && + git clean -f && git checkout ":/Initial" && H=$(git rev-parse --verify HEAD) && M=$(git show-ref -s --verify refs/heads/master) && @@ -284,7 +293,8 @@ test_expect_success 'checkout to detach HEAD with :/message' ' ' test_expect_success 'checkout to detach HEAD with HEAD^0' ' - git checkout -f master && git clean -f && + git checkout -f master && + git clean -f && git checkout HEAD^0 && H=$(git rev-parse --verify HEAD) && M=$(git show-ref -s --verify refs/heads/master) &&