From patchwork Tue Oct 20 12:11:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11846597 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 94FA2C433DF for ; Tue, 20 Oct 2020 12:13:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A9312222F for ; Tue, 20 Oct 2020 12:13:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hNI/KaOw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394282AbgJTMNp (ORCPT ); Tue, 20 Oct 2020 08:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394007AbgJTMNo (ORCPT ); Tue, 20 Oct 2020 08:13:44 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5607CC061755 for ; Tue, 20 Oct 2020 05:13:43 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id ds1so806732pjb.5 for ; Tue, 20 Oct 2020 05:13:43 -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=q6NWybie0Yh+VX1qO8s6tAnf9JU7GOn9SLYT0uupmuA=; b=hNI/KaOwBQJQjilb/8tdXahqE4BGSIe/X+icPLg+lvIASMpRY9m6VXpKwRZHDt7MJw FQPopXnh8ZHWQb8jegRwAO0hdoy0vkX0SpZi4TZ+pMgHEXs0lEyQlhY2p1pFi84oqPdV xDf9ETJZRR2ju/CSrkMRINmBvdzw6mQNN+2FhM3SRbZtRMHc4+G4M43pFuSXmKfTY7aO mXQBB3VqjJuJYQxzQMlRF/LXdNihpWqZautqI6nX4NLs2bcEZpAbQUbcgofMYI+Xtqkw jGbLOis2mHrdnWA+NDMnXioREwMq9pdObNvdSzL38BJhNpb3YYrq+OtdBhkXkM9gcuxM 7J6g== 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=q6NWybie0Yh+VX1qO8s6tAnf9JU7GOn9SLYT0uupmuA=; b=dbm/xAHKbtlHOMM2BOA1BVi7rJbqYj8AIvtNUsJJlhOEluevQeJMApMZwaLxdF8+U6 ukObICEwgQgWjScetyJKDTglem4e/cYZAG9wDLar4tVYfYUdXAECCXG7XWqSahu8aKv3 Je2kmFD3jA8+aQtvy6Ru8x1+NdfPDSrZJVfizN8TIgQ3mEhcHJu7+pAl+bmbBrdAiVtx fGpN2iQeCCF9Tcu66yktR/cm0xrqtHan+oIReUcLoSAePzzIy7Cs6Y2BivwrMqhEwb+y tx0X1LYVEn7tyNRWPtMJxDO8Ysq2nhOWSo/PKt4w60ZPq2+09lXphaFZH8pftgFJduC8 iAzg== X-Gm-Message-State: AOAM533heru7gALzdh7bBTAOXJdkTrNunxtvhQkwOCfd5RA4lNqnpAEn 3guLSQhhAWv4FV8whlPILAyRQ1XDrz2EYA== X-Google-Smtp-Source: ABdhPJy73kowiGyaADmZQtcpV7TmbXT32EQMGFrsYcZ9eTEL+OJp+gNzNhoIoCvTWadx9nI0Bqg6vA== X-Received: by 2002:a17:90a:4ece:: with SMTP id v14mr2689750pjl.70.1603196022681; Tue, 20 Oct 2020 05:13:42 -0700 (PDT) Received: from localhost.localdomain ([106.215.55.55]) by smtp.gmail.com with ESMTPSA id w17sm1954162pga.16.2020.10.20.05.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 05:13:42 -0700 (PDT) From: Charvi Mendiratta To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, phillip.wood123@gmail.com, congdanhqx@gmail.com, me@ttaylorr.com, Charvi Mendiratta Subject: [PATCH v4] t7201: put each command on a separate line Date: Tue, 20 Oct 2020 17:41:52 +0530 Message-Id: <20201020121152.21645-1-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201017075455.9660-1-charvi077@gmail.com> References: <20201017075455.9660-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Modern practice is to avoid multiple commands per line, and instead place each command on its own line. Signed-off-by: Charvi Mendiratta --- 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) && From patchwork Wed Oct 21 12:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11849023 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 DE55FC388F9 for ; Wed, 21 Oct 2020 12:50:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E5E72224E for ; Wed, 21 Oct 2020 12:50:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Cq1+QN+R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442645AbgJUMuv (ORCPT ); Wed, 21 Oct 2020 08:50:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442639AbgJUMuv (ORCPT ); Wed, 21 Oct 2020 08:50:51 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B60FAC0613CE for ; Wed, 21 Oct 2020 05:50:49 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id o7so1425589pgv.6 for ; Wed, 21 Oct 2020 05:50:49 -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=t3Nz13CDPOpDfLJl00FTEqcUcfeuYsIkYRTXx35epXA=; b=Cq1+QN+RT9wpA44fX0uzwAlVrXkSI7EXFcu+855yNb3BX0jHRGDMzZSHn9wOhQXqfu buVQGYOIsPz3YJEv2EvZesnulrT3gAlEw/ZH6wCQD0+aJdiL9RpXnKnTbpcwdOfVW8n5 p5RoGauHCbeHxhttfxRtXjp0RDDgSHtmvBg3DhOw2wBXVaUucbgunZfNbHSHWhE223fu EDLGzN1vCiQaceHylnX5xQl5cqCWU+yM6dn2uqx4ictC/Ow56JpQIGNulSmoRyWYYAn1 8tpiuDtlp9QXoU5Cep/CXDnKtyE1jKXfr9gmd18Jb/p813CP2OclFIbmIslhPq5Olw1b B3+Q== 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=t3Nz13CDPOpDfLJl00FTEqcUcfeuYsIkYRTXx35epXA=; b=R7ETsW0c+58urIsXOG/j9YNf22+9UkdsfgSIWZc4vTMPuhqGNMhj2aMPl3gguGa5Fr pi9nvfiYKO1Qv1CZ3EglXZLGNt3c9PbV4ssmS7Ps4Y7hkMmM9FcrDIgbWOg2d2XRfEcU 2FT7LrzJLxWtR3u8NGF5ZI7Rp+JTO3cimeRiUlBOW09Ln35y7C7Mta8NmZNvBq4C9OEj papwz1SLC7BLH+iR9kiHSLO+lUd1osOCEDqc/6xFG2P2v8QgQLOu9Xw67T3R3t1YNDIe PW2ycYqbN75+rU46oQPM4qv3u5GFreMAV3KjW+LN1KyiidR2Z5ffnckFmsPBKpPxVt6M Shpw== X-Gm-Message-State: AOAM530Cz5kdBU9XkGsWOJp1XjSkW0bkjpGJ9WFSikHmdYYwTDUB0JQB IQJ/R03eHoJWQVWCrYV/Q603S5/iHckWGA== X-Google-Smtp-Source: ABdhPJz9lzkaIEJ6PAogstkMztoXJDRycPdDGqRYlub0FPA2P53v+yj2Pn/JVmXGy0SetVwnj7Vr7g== X-Received: by 2002:a62:17c2:0:b029:158:ca2e:3cd7 with SMTP id 185-20020a6217c20000b0290158ca2e3cd7mr3343400pfx.43.1603284648881; Wed, 21 Oct 2020 05:50:48 -0700 (PDT) Received: from localhost.localdomain ([106.215.55.55]) by smtp.googlemail.com with ESMTPSA id j24sm2054857pjn.9.2020.10.21.05.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 05:50:48 -0700 (PDT) From: Charvi Mendiratta To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, me@ttaylorr.com, phillip.wood123@gmail.com, Charvi Mendiratta Subject: [PATCH v5 2/5][Outreachy] t7102,t7201: remove unnecessary blank spaces in test body Date: Wed, 21 Oct 2020 18:18:20 +0530 Message-Id: <20201021124823.2217-3-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201021124823.2217-1-charvi077@gmail.com> References: <20201020121152.21645-1-charvi077@gmail.com> <20201021124823.2217-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org t7102 and t7201 still follow the old style of having blank lines around test body, which is not consistence with our current practice. Let's remove those unnecessary blank lines. Signed-off-by: Charvi Mendiratta --- 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 Wed Oct 21 12:48:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11849029 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 09AF2C388F9 for ; Wed, 21 Oct 2020 12:51:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 986BE22249 for ; Wed, 21 Oct 2020 12:51:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q7tp/L+T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442639AbgJUMvC (ORCPT ); Wed, 21 Oct 2020 08:51:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408138AbgJUMvC (ORCPT ); Wed, 21 Oct 2020 08:51:02 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1256C0613CE for ; Wed, 21 Oct 2020 05:51:00 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id o7so1425845pgv.6 for ; Wed, 21 Oct 2020 05:51:00 -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=xQDLRFW4FiYAUG6yGXSGbCtCgG6dpFRXFikvWvF4lr0=; b=q7tp/L+T3QrB7Vb9c0x4hAbHXggJHLk1Lk+/vSLrgd27zrfPXiajmF2AO4x/URTmGk flFnYUhnE7/4PpnqbbRtr68RSaQIzWV2ImLVSsD67BCB9G2f8XI2GSGi6nOpRIbXMA3A fqhmzLxADvoVdCcgohzkJ819EyRw94OMHrG+VfGpS+6c3tTEQV3N3DQ6UtE2T4haIYt8 XXD/f+bQo6zLZdkMhIC+xLpf0ZWdSAIBw1Kbd5DuCzAzs+sQiAMYo1CzAh/SfeSJ0H+g PCgbIeUfO/BjAaH60+Iil8BmwAwiGke62e0pTDRxJWkkVkyfhcqEjGSJ4NEvLSevpiCR GwOw== 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=xQDLRFW4FiYAUG6yGXSGbCtCgG6dpFRXFikvWvF4lr0=; b=Zx3IAZqYBqvU9eICOInfEe39w7eQdyEHwGIMEYll59ggOyya+lX9qbmY1lNJbKoI4w smggWqVKr7MudQ5Dj7++7R4aISwUQvCRnifLzbwy8+baV898O9Ybq5olgHzJx9ZFPHSh nnV9wmPH6uEVbJNeigiYZZBdqPHt3PJ0+tKymR/PXpm+5Gi7o5sF+JYiNEE/AK0NSJhC 9Snk+gbaShJHNBH+BxAHHtWJpD22DPd4CUXk53CsgDFvYZ07pgaaAeuHHwpVoEuWiGUT I1yEvjSTitZ5ZWN5x9ofkEQq5SJeKzF/jQFsZZMNIQ/obXZAkvojqfdLjBCtcY0QRtZQ DYOQ== X-Gm-Message-State: AOAM5318tGJnfP+EhCuNL/lpicoHzZSEf1m1Bm2ADXWyefjZuoQYXpiR n6iat2e5Hz2Qetcnd0fM7u3Zp1930PxAQg== X-Google-Smtp-Source: ABdhPJyJzUwvOEul8NrhqjW5SkSQ6I0VMC4vvri42/EjLVj7+dH6BO5/NatqUW4A3DPvXEpYu8Zb+g== X-Received: by 2002:a62:644c:0:b029:155:fdf4:52ed with SMTP id y73-20020a62644c0000b0290155fdf452edmr3482924pfb.9.1603284660001; Wed, 21 Oct 2020 05:51:00 -0700 (PDT) Received: from localhost.localdomain ([106.215.55.55]) by smtp.googlemail.com with ESMTPSA id j24sm2054857pjn.9.2020.10.21.05.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 05:50:59 -0700 (PDT) From: Charvi Mendiratta To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, me@ttaylorr.com, phillip.wood123@gmail.com, Charvi Mendiratta Subject: [PATCH v5 3/5][Outreachy] t7102,t7201: remove whitespace after redirect operator Date: Wed, 21 Oct 2020 18:18:21 +0530 Message-Id: <20201021124823.2217-4-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201021124823.2217-1-charvi077@gmail.com> References: <20201020121152.21645-1-charvi077@gmail.com> <20201021124823.2217-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org According to Documentation/CodingGuidelines, redirect operator is written with space before, but no space after them. Let's remove these whitespaces after redirect operators. Signed-off-by: Charvi Mendiratta Signed-off-by: Junio C Hamano --- 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 Wed Oct 21 12:48:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11849025 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 9E9DAC561F8 for ; Wed, 21 Oct 2020 12:51:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31D552224E for ; Wed, 21 Oct 2020 12:51:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YXlP1UcT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442650AbgJUMvK (ORCPT ); Wed, 21 Oct 2020 08:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442646AbgJUMvK (ORCPT ); Wed, 21 Oct 2020 08:51:10 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0099BC0613CE for ; Wed, 21 Oct 2020 05:51:10 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id c17so270551pjo.5 for ; Wed, 21 Oct 2020 05:51:09 -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=75002kI6Sz9A1VtaOvJzjIf/HZtevb9xw7ms9rpQt+o=; b=YXlP1UcTx6pc0obr1oKGFbs6z8PcRxSQu+07xL+suGb2p8fouMVUwvyaxhL5lSQrCM uPJldr4MRP7VDcZlkNHy5CslF9pnQsS30ORaZkn8oBvAw226zr9PtsQBRDihHbwM+4fz 3OjE1PxuDjIp5WT+71AMrR872lhbclplaJtwcd4t1HfOcQTU4s7pRnKTd60mCvQM6iAx l8FpM0uS5Qf3W+LaQRhBwVZAw83fyLZPl35asXkFNnkO/YBM9xBWHkEN4aI0v2xCZyBN oLNZYPodQbKPLsIz9iCtYkhLp0vd9Fnc4XuxGPS5b9SWq2+DmhGWWJz9RzHK+U1tAh7U q/6w== 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=75002kI6Sz9A1VtaOvJzjIf/HZtevb9xw7ms9rpQt+o=; b=ashhWux419OlmEUw3iKNisq7+DFpoTCWAl+YJ5Kndn3fEO7V6nsgzy22FJ1r1Z8S7A VCTR1qvcuy99Hja1LVi21e+3dNuFIvr4/H6NQyMpy1K/IQagQ4uGtn6JIr4L0ohskmzT zpV5AZRW29lF5oSnFoVkAY4pcFGODaNBOaZs7rGVpGsPHUnJn7qYEvkmyY50xu2PXKU+ ZnwEeJ369J5oGyTaqfU1aW8HfvTR8zJuPVOGmijssFlBoppUpT6RfgjQFqe+FCnu+T4F mPUKZ9rM4EyRtRdnP36fd7hbLu2VjEK3scGkYIKHMqfBw8PAGFS+F9f3ENLvK2805kdS iPZg== X-Gm-Message-State: AOAM530c3fH0br+3Xu+ceXTooCwpQnmpbDBFwxw1kqFBCUgBuDh00d2u pJSVTbdnP5CGuqMlkQnlvY+1G9Z7BXxMRA== X-Google-Smtp-Source: ABdhPJzu4N+v+PH3l5iwIPuBu1SgBha1ETi+pts82euyqKi78emQXAgIK1QrlFGb7bcROb+cKCYhDQ== X-Received: by 2002:a17:902:26c:b029:d6:83c:9486 with SMTP id 99-20020a170902026cb02900d6083c9486mr395715plc.85.1603284669391; Wed, 21 Oct 2020 05:51:09 -0700 (PDT) Received: from localhost.localdomain ([106.215.55.55]) by smtp.googlemail.com with ESMTPSA id j24sm2054857pjn.9.2020.10.21.05.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 05:51:08 -0700 (PDT) From: Charvi Mendiratta To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, me@ttaylorr.com, phillip.wood123@gmail.com, Charvi Mendiratta Subject: [PATCH v5 4/5][Outreachy] t7201: use 'git -C' to avoid subshell Date: Wed, 21 Oct 2020 18:18:22 +0530 Message-Id: <20201021124823.2217-5-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201021124823.2217-1-charvi077@gmail.com> References: <20201020121152.21645-1-charvi077@gmail.com> <20201021124823.2217-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Charvi Mendiratta --- 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 Wed Oct 21 12:48:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charvi Mendiratta X-Patchwork-Id: 11849027 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 8BDBBC388F9 for ; Wed, 21 Oct 2020 12:51:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19E7422249 for ; Wed, 21 Oct 2020 12:51:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pp3Mo8JA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442651AbgJUMvX (ORCPT ); Wed, 21 Oct 2020 08:51:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440530AbgJUMvW (ORCPT ); Wed, 21 Oct 2020 08:51:22 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90054C0613CE for ; Wed, 21 Oct 2020 05:51:22 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id h4so1100937pjk.0 for ; Wed, 21 Oct 2020 05:51:22 -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=q6NWybie0Yh+VX1qO8s6tAnf9JU7GOn9SLYT0uupmuA=; b=pp3Mo8JAnxOdsn6PXs/xjxWAr9dex71Rwr9Uv4Shiz6L3HpAWShpthexF/Y9MFWcQT vlhZpCWz2rCiKH0kJHIO3kIp5/No4qIx9xgI5LkjFohl0i8AoSCOi3qghgbuNYlx+JRs wPDGFBoN1gHdq6/WON7MJij/0KB1OwGctPORRT6YN4ZsM0wdNkgeA90SoxuYIw5Zf2M1 YXok1ENoHpjibu2NzaEXo2qKwJHLtVDixaINruw6Zw6Mwo/tW1dqNgXcg4V+o6eFFhqK poFyCXev7NJBARqZHE3I9k3cY33f4FMl1/RRrfe1Y40DKam20LbpUba2zaDQWFg4yRdY vsXQ== 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=q6NWybie0Yh+VX1qO8s6tAnf9JU7GOn9SLYT0uupmuA=; b=uZlMXKt+i9Mi6fTYZMOjHaz89J8rVk6tL2CGUMHCiw92usU1eOm3hXW1N7ooVipJil WZg48iSlPUp1JqoGhXq9JaKkAS8yDGzik/XfiIAJ42RgwWIKtH6DD7gWHTXZfFoEydD/ +XAvoapNmewSH1HkiYGBcbnRQGTJEHTWKiA5KSQlfi6SV4U+Uzbj3rA6OX3t1VbOKZQI eM/FprmE58o+b50LtvQN3lWqbvWzPiLW300w+amweveJJ6XbFKpMr1bh83K9eJ6A7pW1 yPlidn0JgKOPh+Q/Xqe5eu0B+o6zMMN0wwvMBvO/2kUA5vaJQLFqvRhKKeHo833XyQIK fSTQ== X-Gm-Message-State: AOAM532gEagec0ZLNOgk3EQi0nYIz3PE/L5LvlSFvOXYsdrdn0D4TuPq /8oPauemwQSmr/I7jGN26G5pxAuJ8ubm9g== X-Google-Smtp-Source: ABdhPJzlhL6B8JdgSGeZ24Ap5ccgr2+ZDbgneZhD5kUhehwPTmRAxIolTqAHYKK7YVIhhTpyBs0Jnw== X-Received: by 2002:a17:90a:39c5:: with SMTP id k5mr3318047pjf.34.1603284681919; Wed, 21 Oct 2020 05:51:21 -0700 (PDT) Received: from localhost.localdomain ([106.215.55.55]) by smtp.googlemail.com with ESMTPSA id j24sm2054857pjn.9.2020.10.21.05.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Oct 2020 05:51:21 -0700 (PDT) From: Charvi Mendiratta To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, me@ttaylorr.com, phillip.wood123@gmail.com, Charvi Mendiratta Subject: [PATCH v5 5/5][Outreachy] t7201: put each command on a separate line Date: Wed, 21 Oct 2020 18:18:23 +0530 Message-Id: <20201021124823.2217-6-charvi077@gmail.com> X-Mailer: git-send-email 2.29.0.rc1 In-Reply-To: <20201021124823.2217-1-charvi077@gmail.com> References: <20201020121152.21645-1-charvi077@gmail.com> <20201021124823.2217-1-charvi077@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Modern practice is to avoid multiple commands per line, and instead place each command on its own line. Signed-off-by: Charvi Mendiratta --- 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) &&