From patchwork Tue Feb 9 07:28:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 12077291 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 50CF5C433DB for ; Tue, 9 Feb 2021 07:30:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1FF0A64EB8 for ; Tue, 9 Feb 2021 07:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230356AbhBIHaF (ORCPT ); Tue, 9 Feb 2021 02:30:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbhBIH3y (ORCPT ); Tue, 9 Feb 2021 02:29:54 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F698C06178A for ; Mon, 8 Feb 2021 23:29:14 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id g3so9270319plp.2 for ; Mon, 08 Feb 2021 23:29:14 -0800 (PST) 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=BU0Hi7RAV2KElXGBIE71hMJoCEINqunWPtqs8tMqIso=; b=Ce6aISntrpWryYOiRG8OCTkQwrV4okWE1faZOVTg86jpb931kbbnRwSioGlqoOC4bh d0PZphIStg1CtOgxZcnArKzaZvfQSl0ZbP/IGelH5NIZN/YzxS3Q7slgwskC1yODLft2 zIU6LKNKS7VQh5YDv5bSZlVN9GL7P2oxdc7U+bbKF5EmPXa8LtXiJMov51oSP9+9o0kF HjVgl7nGj8QnfjQnFs61mcJAfM6VoYJG7q7Y9FWcE0JX3wM2J57XxUjrODCWqRC/p9sF og4KTCnhL276kJfG+nkAvB0T7O5jEowCPsewpG9/mPbgC7pEH+/KsHpb+u/DpsNeIRGN O7Bw== 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=BU0Hi7RAV2KElXGBIE71hMJoCEINqunWPtqs8tMqIso=; b=cgQ4Q3ZQGXEca1AjtKxr1rnOZTYsntky96eHe9+OO+iTcNZJSH8Rv32daQs4BTSNK+ 3fVq3mnFejT7psNqRJt0YS/RgEVT2vxxQKT1XnI81oqf4wBMR8u5SDUvV2ueMXh7IU1e saWgphrQ9bQ5qEUS56YXaxHiPU/hR4WLTF4YcIO97LQHYrcaNLz8U1D5kD0xzuJPi0dY zg/FlAkG7mDZVDWwhjzmzy11MRcKnYU1GJFOx5GG8k5+cRR+X0c35cuuDgp+h7/zW60F cmRRVkuGGGofzDRj0iOHnJ/YKtvCgkk0EFPFyLA7TuQzqNvkK4HfQG9oXiEc5M2oOn4Z 0XvA== X-Gm-Message-State: AOAM5330cubJVJyCMF764alKAoDKYRRPK/c48vGI0vq/n5oQiAMRrNoS Z8h/TKCvmDghJcbidDn91LYFJ2Y/61g= X-Google-Smtp-Source: ABdhPJw6qLKi+CFay/qMGjalXLQxpfl48f41bbTBSOqqhVR6Kyt3Ya9eJasYIf1uIXM/HPiO9i0gyw== X-Received: by 2002:a17:90a:b292:: with SMTP id c18mr2786970pjr.134.1612855753779; Mon, 08 Feb 2021 23:29:13 -0800 (PST) Received: from archbookpro.hsd1.ca.comcast.net ([2601:647:4201:c540::414c]) by smtp.gmail.com with ESMTPSA id w4sm5670443pfn.45.2021.02.08.23.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 23:29:13 -0800 (PST) From: Denton Liu To: Git Mailing List Cc: Junio C Hamano , Eric Sunshine Subject: [PATCH v2 2/9] t3905: remove spaces after redirect operators Date: Mon, 8 Feb 2021 23:28:48 -0800 Message-Id: <45ed17bfe2dad4702904a07a4a77a8d219df8379.1612855690.git.liu.denton@gmail.com> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org For shell scripts, the usual convention is for there to be no space after redirection operators, (e.g. `>file`, not `> file`). Remove these spaces wherever they appear. Signed-off-by: Denton Liu --- t/t3905-stash-include-untracked.sh | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh index f075c7f1f3..1d416944b7 100755 --- a/t/t3905-stash-include-untracked.sh +++ b/t/t3905-stash-include-untracked.sh @@ -8,16 +8,16 @@ test_description='Test git stash --include-untracked' . ./test-lib.sh test_expect_success 'stash save --include-untracked some dirty working directory' ' - echo 1 > file && + echo 1 >file && git add file && test_tick && git commit -m initial && - echo 2 > file && + echo 2 >file && git add file && - echo 3 > file && + echo 3 >file && test_tick && - echo 1 > file2 && - echo 1 > HEAD && + echo 1 >file2 && + echo 1 >HEAD && mkdir untracked && echo untracked >untracked/untracked && git stash --include-untracked && @@ -25,7 +25,7 @@ test_expect_success 'stash save --include-untracked some dirty working directory git diff-index --cached --quiet HEAD ' -cat > expect <expect < expect.diff <expect.diff < expect.lstree <expect.lstree < expect <expect < file3 && + echo 4 >file3 && git add file3 && test_tick && git stash -u ' blob=$(git rev-parse --short $(echo 4 | git hash-object --stdin)) -cat > expect <expect < /dev/null +git reset >/dev/null # Must direct output somewhere where it won't be considered an untracked file test_expect_success 'stash save --include-untracked -q is quiet' ' - echo 1 > file5 && - git stash save --include-untracked --quiet > .git/stash-output.out 2>&1 && + echo 1 >file5 && + git stash save --include-untracked --quiet >.git/stash-output.out 2>&1 && test_line_count = 0 .git/stash-output.out && rm -f .git/stash-output.out ' @@ -141,7 +141,7 @@ test_expect_success 'stash save --include-untracked -q is quiet' ' test_expect_success 'stash save --include-untracked removed files' ' rm -f file && git stash save --include-untracked && - echo 1 > expect && + echo 1 >expect && test_cmp expect file ' @@ -152,14 +152,14 @@ test_expect_success 'stash save --include-untracked removed files got stashed' ' test_path_is_missing file ' -cat > .gitignore <.gitignore < ignored && + echo ignored >ignored && mkdir ignored.d && echo ignored >ignored.d/untracked && git stash -u && @@ -169,7 +169,7 @@ test_expect_success 'stash save --include-untracked respects .gitignore' ' ' test_expect_success 'stash save -u can stash with only untracked files different' ' - echo 4 > file4 && + echo 4 >file4 && git stash -u && test_path_is_missing file4 ' @@ -214,7 +214,7 @@ test_expect_success 'stash push with $IFS character' ' test_path_is_file bar ' -cat > .gitignore <.gitignore <ignored.d/foo && - echo "!ignored.d/foo" >> .gitignore && + echo "!ignored.d/foo" >>.gitignore && git stash save --include-untracked && test_path_is_missing ignored.d/foo && git stash pop &&