From patchwork Fri Aug 21 16:59:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11729999 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1DC9E13B1 for ; Fri, 21 Aug 2020 17:02:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3DB420748 for ; Fri, 21 Aug 2020 17:02:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V11C2iGq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728663AbgHURA4 (ORCPT ); Fri, 21 Aug 2020 13:00:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728687AbgHURAi (ORCPT ); Fri, 21 Aug 2020 13:00:38 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB315C061797 for ; Fri, 21 Aug 2020 10:00:06 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id k13so1130169plk.13 for ; Fri, 21 Aug 2020 10:00:06 -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=tuQL3j/CxAtIzAlHz61Jd677nfNIp//do6kxQlibmCY=; b=V11C2iGqrJSUVpgjpyGGak9IH0xNy8zwu1C13buJhgJe3ZsFiqQoyIMWtQjLzSPyIq pZb9/wr4noQNLEVAvn2wwCBEGHydLaaa8FZKMM5OZMXBbG5hqswnDvnXx9Bg+RSbyeA4 FfqPgz1JnjcDK+6VHeBoXh9v1/5mC3TcRe3CSEyoYY2D+lzh2RET1rqpcNhwPMiLv/9J hONOVrU7QQkPxPFtfJNMuaXUDxSI3Tsobo0ZJ1lh5swDcd7fQceMGcpI0gkXub6mLgFu Za51yW8vKTqffErThXNVo1cMJHo3ZckYtntkRQ4seQyaugi7xTX8c/aXQ68+nvtuoagz 6MPA== 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=tuQL3j/CxAtIzAlHz61Jd677nfNIp//do6kxQlibmCY=; b=iaGpfh4wE40Vc/DNWtvSr1OVwZNUaJV9JqlzAmqUyiU71FxYqBK2mtMNyGVz/QzzIK 7fATkapfSHH2qQi3g0PbQIsWTbxB8lUh9hoWJMFQegvavaJJ+SGvLxMt91RBc0U75lZw FrOYQevjhgkTU2BzxzPukv6s3JpHAMuqysVRvl7J3jOSFU2IE4n+PtVWDJGKvZMeT7wg srOAQ/UwcQkSkaS3ZLcioLaRPASisYv1SrReo9Inyga5ebr8+JpAI4TbMYlQ9u25ex7N NfNOp6egtvpNvMTitfC1ahNYHzOfDUhLk+e98AiZsvsZPKl0Nn6lTZgwTIa+cAo5XkCH lHvg== X-Gm-Message-State: AOAM531Q/G69YOan7+5fOMq3dvV17ze3ICWaDhDQ6D9lv+5WDKTVGc/c 0cNj7nGmv5P2710o+Dt1c1Ltg+Z9bbm68w== X-Google-Smtp-Source: ABdhPJw278PB/3ZYJfJc2qZ6NLW+K3oMtLfrKWHQ0Ie8l9GbIGVPPxZxzNKSAvSLpVgxw5qq/unWBQ== X-Received: by 2002:a17:90b:3197:: with SMTP id hc23mr3199227pjb.60.1598029205955; Fri, 21 Aug 2020 10:00:05 -0700 (PDT) Received: from localhost.localdomain ([125.99.204.38]) by smtp.gmail.com with ESMTPSA id q7sm3043505pfu.133.2020.08.21.10.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 10:00:05 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, me@ttaylorr.com, Shourya Shukla , Christian Couder Subject: [PATCH v3 1/5] t7401: modernize style Date: Fri, 21 Aug 2020 22:29:48 +0530 Message-Id: <20200821165952.14376-2-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200821165952.14376-1-shouryashukla.oo@gmail.com> References: <20200821165952.14376-1-shouryashukla.oo@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org The tests in 't7401-submodule-summary.sh' were written a long time ago and has a violation with respect to our CodingGuidelines which is, incorrect spacing in usages of the redirection operator. Mentored-by: Christian Couder Mentored-by: Kaartic Sivaraam Helped-by: Denton Liu Helped-by: Taylor Blau Signed-off-by: Shourya Shukla --- t/t7401-submodule-summary.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index 9bc841d085..07d4ba0b26 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -16,7 +16,7 @@ add_file () { owd=$(pwd) cd "$sm" for name; do - echo "$name" > "$name" && + echo "$name" >"$name" && git add "$name" && test_tick && git commit -m "Add $name" From patchwork Fri Aug 21 16:59:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11730011 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1505A13B1 for ; Fri, 21 Aug 2020 17:04:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB86720702 for ; Fri, 21 Aug 2020 17:04:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="luiVk8df" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728427AbgHUREQ (ORCPT ); Fri, 21 Aug 2020 13:04:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728689AbgHURAi (ORCPT ); Fri, 21 Aug 2020 13:00:38 -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 C3E24C061798 for ; Fri, 21 Aug 2020 10:00:10 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id 128so1283551pgd.5 for ; Fri, 21 Aug 2020 10:00:10 -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=LLKYEQh2ASyGkfl7D0NE9HMv4t3yOOMzWWsPLW7TZT0=; b=luiVk8dfxdDCzir+kcA7vI76Go9Gr2L35j2QpC5k6f3XA+veocd8Doo8oeF0DlM+MD qLY83LgXqq7r//J5BVvURpBMEHTysXRYE/RivQIrJms8vR0NuEx8DEutp4RA7dFZe4Cm 9hP3El9tiyTOlNNOQliEv0wr0qmAT8kCYeZ48T7g+qwyAcllBdMysyLSy/Pz/vwnWv8C l8XCP8sEPXBEPrl7z0FppXPVEI/7D+/tUJHJ86KhM5Z2xN9zDSnEKIg4kvD2TRVhC7oB w/rl+ecPq6fbvG5BJw9RmwyQvIcW3dGCgqaa8WlG8QqTS8EUUyyKnCCIuchjcSbuzLAP gxow== 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=LLKYEQh2ASyGkfl7D0NE9HMv4t3yOOMzWWsPLW7TZT0=; b=GrL6FhS+AIHzWYWzTYx6hLaUHSYao3aZ6watFZW5BqM1JYpeAJDzOEC1cJLml7ThYd iXTASUjJamHq90uwpEy76Mlzin9y6ZypeW/HHrG/s8csE9+3CbBB79M/lFbeu+pvRkxm irRkZ9B2r66zWXp/D6EZfzmIHS+Aho5ovZv6EiRPfaCx/aAokp9v+8eyDOCnj+Ak8/kM yS76GHEP8We1kwd+B7l6Ys96BmmziTrQN+jZLAFiXx2XkBqHxKIQgp0htmFG9tfMnc08 3LF2voaKSGeEjrdTSf3HpGj0jejtaMMbV1jI/XiG8fz7VnAreDWbGgvXfj4z5XZnI4J+ 5fig== X-Gm-Message-State: AOAM530U29hBg7p/HpZ68qRsE3W6OeP1xg9rRFJ9G8mXqo9bsy9YOI3r 7Ye5aQ3fwvXMhEnHBZLrq/WE2sBXab5Vmw== X-Google-Smtp-Source: ABdhPJxh9LWBBhs/e1wOn4Bw/4fdr64RxjrWdSeMbjaNaDMEiLQwv4HUbjUuF8DYdz+DZXVOSFsuoA== X-Received: by 2002:a62:d10a:: with SMTP id z10mr3328978pfg.7.1598029209774; Fri, 21 Aug 2020 10:00:09 -0700 (PDT) Received: from localhost.localdomain ([125.99.204.38]) by smtp.gmail.com with ESMTPSA id q7sm3043505pfu.133.2020.08.21.10.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 10:00:09 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, me@ttaylorr.com, Shourya Shukla , Christian Couder Subject: [PATCH v3 2/5] t7401: use 'short' instead of 'verify' and cut in rev-parse calls Date: Fri, 21 Aug 2020 22:29:49 +0530 Message-Id: <20200821165952.14376-3-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200821165952.14376-1-shouryashukla.oo@gmail.com> References: <20200821165952.14376-1-shouryashukla.oo@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 'git rev-parse' can limit the number of characters in the hash it outputs using the '--short' option, thereby, making the 'cut' invocation redundant. Since using '--short' implies '--verify' as well, we can safely replace the latter with the former. This change results in the helper functions getting the hash in the same way 'summary' gets the hash internally. So, avoid the unnecessary invocation to 'cut' in the helper functions. Mentored-by: Christian Couder Mentored-by: Kaartic Sivaraam Signed-off-by: Shourya Shukla --- t/t7401-submodule-summary.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index 07d4ba0b26..ccbac875fe 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -21,7 +21,7 @@ add_file () { test_tick && git commit -m "Add $name" done >/dev/null - git rev-parse --verify HEAD | cut -c1-7 + git rev-parse --short HEAD cd "$owd" } commit_file () { @@ -125,7 +125,7 @@ commit_file sm1 && head3=$( cd sm1 && git reset --hard HEAD~2 >/dev/null && - git rev-parse --verify HEAD | cut -c1-7 + git rev-parse --short HEAD ) test_expect_success 'modified submodule(backward)' " From patchwork Fri Aug 21 16:59:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11730001 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B826316B1 for ; Fri, 21 Aug 2020 17:02:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CCD520702 for ; Fri, 21 Aug 2020 17:02:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gfaP5IAr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728749AbgHURCt (ORCPT ); Fri, 21 Aug 2020 13:02:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728692AbgHURAl (ORCPT ); Fri, 21 Aug 2020 13:00:41 -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 ED9BFC061799 for ; Fri, 21 Aug 2020 10:00:14 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id o5so1287715pgb.2 for ; Fri, 21 Aug 2020 10:00: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=LXkrw20yLjX1KsUIavUoTrnoamJ1W6Y0DYIrZ43UJU8=; b=gfaP5IArblnpIOI1K2Sv8TwKX4IbToOKECY5qUVBLDzp/c2EBVy4NuHxKPlUxLdh7W HGmdb4oZXuZmLREBA1ufbVN4kKW1SfZvb6yrGo9SwTfWXwtOxaZfudS/ajxuXlWMDbIq XkFj4HI+KTCIbke7nwfGvj3Cb20heXp2ygQRA4HIJj72rllT5tKKOtgMuTlY9l8zmQPc Lqme6RVRp3HgQxJa6NF/gLWBWl8Lnsa7k6S4+ggrOeP6Z/lymmSMvswox+8CL7QgE1Ap I4XWOEn7qIX1IlU+/tbgMoHtJ7g2CIDNi8U4sfQGRi0IXx6tXRKDXGo/0Lsj28EXh5Gi TQnQ== 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=LXkrw20yLjX1KsUIavUoTrnoamJ1W6Y0DYIrZ43UJU8=; b=kfcqPMhgqr6mImsJ3D/8/CoSZG0q0NIyr+Ky+wTuh/ccrD2aZ2QuyjyhRaAbLdk4/x Q/VKKutClx/94VnerGC5GQ0gX+8ybY7iMhOCh3gQrcv8hzhCVXrQZKX/XZHBYYj5L6Vc HwnT8cjM1HBT0BJEr6V4M5eWCSbGxN31oZtwKTIByewVlqzMuH9WoVjCAoEJAhgcN2GC /8UmjIVVW0b+6qsZ/8rrf1778GjYkTpQm0O8puio8MuSJOnf34tHYXvwp8CINsHxnkTV 0Yp6yaNObokR3UdFrRhNwvT1RuZdcv0qCXrrGz8dJLwwsHL5j+2v9mNU8S3d948GIQfL VthA== X-Gm-Message-State: AOAM5332WwP2NSi1mI3Cand484lQ+GKBuo0taC1rQ1Z7pBUb0sdMEzW/ OhEb+jRsRBjqf9gmaWmomworu6l7JYZt+w== X-Google-Smtp-Source: ABdhPJwvGEN0Md4ZbB3iJNfEUr8QgDYmEkl0o/2D4KKJxh7od8CL9f4V71LzFhXi9jinXoSt+CuQpA== X-Received: by 2002:aa7:9570:: with SMTP id x16mr3284799pfq.254.1598029213980; Fri, 21 Aug 2020 10:00:13 -0700 (PDT) Received: from localhost.localdomain ([125.99.204.38]) by smtp.gmail.com with ESMTPSA id q7sm3043505pfu.133.2020.08.21.10.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 10:00:13 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, me@ttaylorr.com, Shourya Shukla , Christian Couder Subject: [PATCH v3 3/5] t7401: change syntax of test_i18ncmp calls for clarity Date: Fri, 21 Aug 2020 22:29:50 +0530 Message-Id: <20200821165952.14376-4-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200821165952.14376-1-shouryashukla.oo@gmail.com> References: <20200821165952.14376-1-shouryashukla.oo@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Change the test_i18ncmp syntax from 'test_i18ncmp actual expected' to 'test_i18ncmp expected actual' to align it with the convention followed by other tests in the test script. Mentored-by: Christian Couder Mentored-by: Kaartic Sivaraam Signed-off-by: Shourya Shukla --- t/t7401-submodule-summary.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index ccbac875fe..3f580455f7 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -181,7 +181,7 @@ test_expect_success 'typechanged submodule(submodule->blob), --cached' " < Add foo5 EOF - test_i18ncmp actual expected + test_i18ncmp expected actual " test_expect_success 'typechanged submodule(submodule->blob), --files' " @@ -191,7 +191,7 @@ test_expect_success 'typechanged submodule(submodule->blob), --files' " > Add foo5 EOF - test_i18ncmp actual expected + test_i18ncmp expected actual " rm -rf sm1 && @@ -202,7 +202,7 @@ test_expect_success 'typechanged submodule(submodule->blob)' " * sm1 $head4(submodule)->$head5(blob): EOF - test_i18ncmp actual expected + test_i18ncmp expected actual " rm -f sm1 && @@ -215,7 +215,7 @@ test_expect_success 'nonexistent commit' " Warn: sm1 doesn't contain commit $head4_full EOF - test_i18ncmp actual expected + test_i18ncmp expected actual " commit_file @@ -283,7 +283,7 @@ EOF test_expect_success '--for-status' " git submodule summary --for-status HEAD^ >actual && - test_i18ncmp actual - < X-Patchwork-Id: 11730009 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5DEE613B1 for ; Fri, 21 Aug 2020 17:04:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F1A820702 for ; Fri, 21 Aug 2020 17:04:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cYmX9a7h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727957AbgHUREP (ORCPT ); Fri, 21 Aug 2020 13:04:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728433AbgHURAl (ORCPT ); Fri, 21 Aug 2020 13:00:41 -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 8C84FC06179A for ; Fri, 21 Aug 2020 10:00:19 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id q1so1081286pjd.1 for ; Fri, 21 Aug 2020 10:00:19 -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=SnwZdWiZ7Px/29uFhZtEzcy68tcyXj0Eupyu8JdP+Ng=; b=cYmX9a7hLya0OCAbthxI0WlCWdbQtiGKeloOTVoSsDS4jK9Pjdtt+LncnmkX5grKET x79LMYahiKjYGtowa4e2ASqyV3rm0xuXQMWlX8SOQTEEq1oeE5vna+E+mbJRZnbH29qF VUDQnc58LVepxv1FfV8BskmAyc6lIHQ10eIYGuzk/FJCLOCM83x2tixEzqSKPtv8qF8G AB3ymE6YGK5B0AvGbxSPRRASMGZhHsNj+w2828elMkHEmAnvTUUa9keYa3kl48JjnWMO pV+2AixqmPIW4FVpP44PmLbLv7khwmOoYCwSk3FkEEs1bCbW8E7iJ3ws8keDxGmBiaH2 P/Ow== 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=SnwZdWiZ7Px/29uFhZtEzcy68tcyXj0Eupyu8JdP+Ng=; b=kRY+Xf5cdzw5ipJbOw/NkF1frO665kQZ53r0rSPebNCnC+p1307WF2qqrCvx7xId/+ 6HKThIwLOiXJY6OlE40DsRzikGgdmDMTA5OKzB1Vcm/27BCdh/a/D5yFIbyzS2G73L+h jfJZ0ZgavHO70MdgDu4Caha7OmMFejWZc+XQrw9juelD6ynlWKLScIO+sDe2grTX5Qll hGsxRj9bzPeik9YbsARX8SLzOMvvThyAjXCe5Wsy2r251pSku/s/wC+KGtihI4wP41dS Yrh+JulY6FngeQfnwd+VSLiNEck4pJejMT41G4Qgev9alYmnDZSrpffJrQ6BRtDVBvQg g2+w== X-Gm-Message-State: AOAM532Cvs7aBuoZM0zdF0IGC4nS4HuyQQxytoBYLWW+aGwln9rOzsmE W5J2FDGDOwSFdTs2rBs9MzIPAotwN2ppKQ== X-Google-Smtp-Source: ABdhPJzUr6+tIt+aBQH5leoON6NG5uTd45YxTigtbVIzjORrYewYi1IAmpFP5tNqrMx/C+CQogGvHA== X-Received: by 2002:a17:902:c154:: with SMTP id 20mr3211167plj.64.1598029218448; Fri, 21 Aug 2020 10:00:18 -0700 (PDT) Received: from localhost.localdomain ([125.99.204.38]) by smtp.gmail.com with ESMTPSA id q7sm3043505pfu.133.2020.08.21.10.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 10:00:17 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, me@ttaylorr.com, Shourya Shukla , Christian Couder , Taylor Blau Subject: [PATCH v3 4/5] t7401: change indentation for enhanced readability Date: Fri, 21 Aug 2020 22:29:51 +0530 Message-Id: <20200821165952.14376-5-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200821165952.14376-1-shouryashukla.oo@gmail.com> References: <20200821165952.14376-1-shouryashukla.oo@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Change the indentation of expected outputs for enhanced readability of the tests. Also modify the heredoc string limiter in a test which lacks it to support the indentation change. Mentored-by: Christian Couder Mentored-by: Kaartic Sivaraam Helped-by: Junio C Hamano Helped-by: Taylor Blau Signed-off-by: Shourya Shukla --- t/t7401-submodule-summary.sh | 130 +++++++++++++++++------------------ 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index 3f580455f7..1491ab6448 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -38,10 +38,10 @@ test_expect_success 'added submodule' " git add sm1 && git submodule summary >actual && cat >expected <<-EOF && -* sm1 0000000...$head1 (2): - > Add foo2 + * sm1 0000000...$head1 (2): + > Add foo2 -EOF + EOF test_cmp expected actual " @@ -52,10 +52,10 @@ test_expect_success 'added submodule (subdirectory)' " git submodule summary >../actual ) && cat >expected <<-EOF && -* ../sm1 0000000...$head1 (2): - > Add foo2 + * ../sm1 0000000...$head1 (2): + > Add foo2 -EOF + EOF test_cmp expected actual " @@ -73,10 +73,10 @@ test_expect_success 'added submodule (subdirectory with explicit path)' " git submodule summary ../sm1 >../actual ) && cat >expected <<-EOF && -* ../sm1 0000000...$head1 (2): - > Add foo2 + * ../sm1 0000000...$head1 (2): + > Add foo2 -EOF + EOF test_cmp expected actual " @@ -86,20 +86,20 @@ head2=$(add_file sm1 foo3) test_expect_success 'modified submodule(forward)' " git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head1...$head2 (1): - > Add foo3 + * sm1 $head1...$head2 (1): + > Add foo3 -EOF + EOF test_cmp expected actual " test_expect_success 'modified submodule(forward), --files' " git submodule summary --files >actual && cat >expected <<-EOF && -* sm1 $head1...$head2 (1): - > Add foo3 + * sm1 $head1...$head2 (1): + > Add foo3 -EOF + EOF test_cmp expected actual " @@ -110,10 +110,10 @@ test_expect_success 'no ignore=all setting has any effect' " git config diff.ignoreSubmodules all && git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head1...$head2 (1): - > Add foo3 + * sm1 $head1...$head2 (1): + > Add foo3 -EOF + EOF test_cmp expected actual && git config --unset diff.ignoreSubmodules && git config --remove-section submodule.sm1 && @@ -131,11 +131,11 @@ head3=$( test_expect_success 'modified submodule(backward)' " git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head2...$head3 (2): - < Add foo3 - < Add foo2 + * sm1 $head2...$head3 (2): + < Add foo3 + < Add foo2 -EOF + EOF test_cmp expected actual " @@ -144,25 +144,25 @@ head4_full=$(GIT_DIR=sm1/.git git rev-parse --verify HEAD) test_expect_success 'modified submodule(backward and forward)' " git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head2...$head4 (4): - > Add foo5 - > Add foo4 - < Add foo3 - < Add foo2 + * sm1 $head2...$head4 (4): + > Add foo5 + > Add foo4 + < Add foo3 + < Add foo2 -EOF + EOF test_cmp expected actual " test_expect_success '--summary-limit' " git submodule summary -n 3 >actual && cat >expected <<-EOF && -* sm1 $head2...$head4 (4): - > Add foo5 - > Add foo4 - < Add foo3 + * sm1 $head2...$head4 (4): + > Add foo5 + > Add foo4 + < Add foo3 -EOF + EOF test_cmp expected actual " @@ -177,20 +177,20 @@ mv sm1-bak sm1 test_expect_success 'typechanged submodule(submodule->blob), --cached' " git submodule summary --cached >actual && cat >expected <<-EOF && -* sm1 $head4(submodule)->$head5(blob) (3): - < Add foo5 + * sm1 $head4(submodule)->$head5(blob) (3): + < Add foo5 -EOF + EOF test_i18ncmp expected actual " test_expect_success 'typechanged submodule(submodule->blob), --files' " git submodule summary --files >actual && cat >expected <<-EOF && -* sm1 $head5(blob)->$head4(submodule) (3): - > Add foo5 + * sm1 $head5(blob)->$head4(submodule) (3): + > Add foo5 -EOF + EOF test_i18ncmp expected actual " @@ -199,9 +199,9 @@ git checkout-index sm1 test_expect_success 'typechanged submodule(submodule->blob)' " git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head4(submodule)->$head5(blob): + * sm1 $head4(submodule)->$head5(blob): -EOF + EOF test_i18ncmp expected actual " @@ -211,10 +211,10 @@ head6=$(add_file sm1 foo6 foo7) test_expect_success 'nonexistent commit' " git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head4...$head6: - Warn: sm1 doesn't contain commit $head4_full + * sm1 $head4...$head6: + Warn: sm1 doesn't contain commit $head4_full -EOF + EOF test_i18ncmp expected actual " @@ -222,10 +222,10 @@ commit_file test_expect_success 'typechanged submodule(blob->submodule)' " git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head5(blob)->$head6(submodule) (2): - > Add foo7 + * sm1 $head5(blob)->$head6(submodule) (2): + > Add foo7 -EOF + EOF test_i18ncmp expected actual " @@ -234,9 +234,9 @@ rm -rf sm1 test_expect_success 'deleted submodule' " git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head6...0000000: + * sm1 $head6...0000000: -EOF + EOF test_cmp expected actual " @@ -249,22 +249,22 @@ test_expect_success 'create second submodule' ' test_expect_success 'multiple submodules' " git submodule summary >actual && cat >expected <<-EOF && -* sm1 $head6...0000000: + * sm1 $head6...0000000: -* sm2 0000000...$head7 (2): - > Add foo9 + * sm2 0000000...$head7 (2): + > Add foo9 -EOF + EOF test_cmp expected actual " test_expect_success 'path filter' " git submodule summary sm2 >actual && cat >expected <<-EOF && -* sm2 0000000...$head7 (2): - > Add foo9 + * sm2 0000000...$head7 (2): + > Add foo9 -EOF + EOF test_cmp expected actual " @@ -272,24 +272,24 @@ commit_file sm2 test_expect_success 'given commit' " git submodule summary HEAD^ >actual && cat >expected <<-EOF && -* sm1 $head6...0000000: + * sm1 $head6...0000000: -* sm2 0000000...$head7 (2): - > Add foo9 + * sm2 0000000...$head7 (2): + > Add foo9 -EOF + EOF test_cmp expected actual " test_expect_success '--for-status' " git submodule summary --for-status HEAD^ >actual && - test_i18ncmp - actual < Add foo9 + * sm2 0000000...$head7 (2): + > Add foo9 -EOF + EOF " test_expect_success 'fail when using --files together with --cached' " From patchwork Fri Aug 21 16:59:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11730005 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E650116B1 for ; Fri, 21 Aug 2020 17:03:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBE6B2173E for ; Fri, 21 Aug 2020 17:03:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bkWYLWAY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728664AbgHURDx (ORCPT ); Fri, 21 Aug 2020 13:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728693AbgHURAl (ORCPT ); Fri, 21 Aug 2020 13:00:41 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43850C06179B for ; Fri, 21 Aug 2020 10:00:23 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id d22so1362860pfn.5 for ; Fri, 21 Aug 2020 10:00:23 -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=epu8VIcxRGdHWW6sjJKuiHPpzM9PxL8de3hGutwVKuU=; b=bkWYLWAY1XVTnRI128yQmDmVibphiCVF5HtUjACyDiiFrKzlqa9mHMLMVuIApTrlWw fV+vfWbZ+9+iBWJVFnzA7oL7AmziHek19bVId1b3u3SWFzPpF/SiOPcfcSl5o3l8tppS DyJygWBd3D4ivnvN4q2Mua6QG4bMeMaq+GKKSi92sSJN4QkeepJhDtqXdYkyiBlY032Z cAR9Ivcy6j7grOWS8XW9B9l6afL9qLubcpxBduJ7Hzhw/F/I3UlXKLO8oCKFPqlcPACg lc+rkl6+0Uh5Q+yY3VaSNS/Vd/mSovHEHv9XjT9Ro8BIpMbcdCZyntK1IzqT28RN/xHL 4oQQ== 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=epu8VIcxRGdHWW6sjJKuiHPpzM9PxL8de3hGutwVKuU=; b=fT4Z4AIG/QitIG+mpNO8H4jNalCHFFFTOtkR37BEjEDZqbZBJBWLCReMIxg+ZbHl3Q 9CJarv9T6qgxzorehZXBDzs+gl8oSQOU7ixBQE38oN66a6mLHWhJtn6d8Kie76fHYBYS EEczsIsUE482L2tYCHtEyMOQdDMl3IUJeB0hicFg7ek7c1n5cE47khsBy2N1AgxBN90/ DwfkBwW0dCFNgwNCHN+3crJkZjugn6/5odEfVwEdzm23u5PILyCv3FuyOUVAiu0qfa9Q K2mhkDrRiHB4ws9jgniaGEOuZf9dsg+9qiId4xmlr9AklWsZTHRCoJRPYT9QaEB4RhDB Cbfw== X-Gm-Message-State: AOAM531YeRyhxRN7IGT1uOkp6WLfIb9PXKBscnTUdkereuxGxmEMf8eK m2aQZvvFIkVBpjGKNvedcaA84FGgrGzklw== X-Google-Smtp-Source: ABdhPJzyt7197CqRP41Qz5jcdOeCvL7DxHg/UQ1U+xqGgyWX9WrJ5eonlgZMPrVX7Lb1BwIe+U05jQ== X-Received: by 2002:a62:31c7:: with SMTP id x190mr3320842pfx.100.1598029222311; Fri, 21 Aug 2020 10:00:22 -0700 (PDT) Received: from localhost.localdomain ([125.99.204.38]) by smtp.gmail.com with ESMTPSA id q7sm3043505pfu.133.2020.08.21.10.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 10:00:21 -0700 (PDT) From: Shourya Shukla To: git@vger.kernel.org Cc: gitster@pobox.com, christian.couder@gmail.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, me@ttaylorr.com, Shourya Shukla , Christian Couder Subject: [PATCH v3 5/5] t7401: add a NEEDSWORK Date: Fri, 21 Aug 2020 22:29:52 +0530 Message-Id: <20200821165952.14376-6-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200821165952.14376-1-shouryashukla.oo@gmail.com> References: <20200821165952.14376-1-shouryashukla.oo@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add a NEEDSWORK regarding the outdated syntax and working of the test, which may need to be improved to obtain better and desired results. While at it, change the word 'test' to 'test script' in the test description to avoid ambiguity. Mentored-by: Christian Couder Mentored-by: Kaartic Sivaraam Helped-by: Taylor Blau Signed-off-by: Shourya Shukla --- t/t7401-submodule-summary.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index 1491ab6448..cc87d26619 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -5,8 +5,11 @@ test_description='Summary support for submodules -This test tries to verify the sanity of summary subcommand of git submodule. +This test script tries to verify the sanity of summary subcommand of git submodule. ' +# NEEDSWORK: This test script is old fashioned and may need a big cleanup due to +# various reasons, one of them being that there are lots of commands taking place +# outside of 'test_expect_success' block, which is no longer in good-style. . ./test-lib.sh