From patchwork Wed Aug 12 19:27:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11711217 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 506C5174A for ; Wed, 12 Aug 2020 19:27:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 370CA20866 for ; Wed, 12 Aug 2020 19:27:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uSqHmyrv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbgHLT15 (ORCPT ); Wed, 12 Aug 2020 15:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbgHLT14 (ORCPT ); Wed, 12 Aug 2020 15:27:56 -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 7C6ACC061383 for ; Wed, 12 Aug 2020 12:27:56 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id u20so1534834pfn.0 for ; Wed, 12 Aug 2020 12:27:56 -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=+43AKhSetU4Vypt4DeZDZpS6+RsvVHmgvJZtbi/Z+/M=; b=uSqHmyrvizW45HdhiAU1Kmj5yumIh1ua+7qKzSy00+E0WuJ0blcrXIajbGVhEMNOZx 0XI02XRFnt+qfXfz4LExIzq4Z41Bc9VFxC+A58aoGNH5H1/W35fm338tZ+yp1eaczRK+ BgKEgUrUR9Ij3KlXqCB/d5CpHhABru0+jq67X/8Hzudm7fIEyzYcVt2OnAHgKs5zy00F wLc8RHUpLoN3yPV5sOAoIJAz3WwbHcRSgUzI5IA5Cr5bDe75g7gJY2K/+dbJD/J9vztf zJ9kHGNY/rLCEVEux3iwul45FrHDycU3q8hCiXI3FjFyHKkDfIUSTc0PF5okw/SpH08k ySLw== 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=+43AKhSetU4Vypt4DeZDZpS6+RsvVHmgvJZtbi/Z+/M=; b=uXXKED1IAHf8jg98pHgSNd2vRPIpdAul5NZ0kNTvSbxr9VLfKbJDp3p+Wr2emBenvY UIZ4PZvUPx+/Y7rmQ2jSBT8OAoGDi53gX24ABWsp6V9N7kBSS57hovrbpUbQIerEptgW YXZxchKaBc1mpMtsu4rZeAL2EjrGpw0uCWqD+litYUygXTh6E+mwfr5xrek6RVDH+ZmF z5yV4RJxfoPxwAidqOujy9wTJGPfxqlzKlFxyYVjVytmZnrVLT7oHojh/JdmlJqMhpmF xre9OIxUQTAx9SEojrEr2veDlN9cx6mHqgfKp+t4Y9722aj6x/Fzl6GSu10ZD5WG1nQF jTNA== X-Gm-Message-State: AOAM532YCcrVzIYBdhpUgtRnuk/MY0kpw4JgSDK9K8AYHN5tLQ3Ba+4Q tLhcu0SHzlaTYcXH2DzepYg= X-Google-Smtp-Source: ABdhPJzF1LgEFKM0INU58ov2r0utj00XmYHg5juV6Uhu4jd5bP37YzFDi5tcd5eo7UUDP9JrJuKmHg== X-Received: by 2002:a65:6212:: with SMTP id d18mr550787pgv.402.1597260476031; Wed, 12 Aug 2020 12:27:56 -0700 (PDT) Received: from localhost.localdomain ([45.127.46.132]) by smtp.gmail.com with ESMTPSA id f3sm3463334pfj.206.2020.08.12.12.27.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 12:27:55 -0700 (PDT) From: Shourya Shukla To: shouryashukla.oo@gmail.com Cc: christian.couder@gmail.com, git@vger.kernel.org, gitster@pobox.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, Christian Couder , Taylor Blau Subject: [PATCH v2 1/4] t7401: modernize style Date: Thu, 13 Aug 2020 00:57:34 +0530 Message-Id: <20200812192737.13971-2-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200812192737.13971-1-shouryashukla.oo@gmail.com> References: <20200805174921.16000-1-shouryashukla.oo@gmail.com> <20200812192737.13971-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. Using a Git command in the upstream of a pipe might result in us losing its exit code. So, convert such usages so that they write to a file and read from them. 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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index 9bc841d085..8ee78bcb69 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -16,12 +16,13 @@ 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" done >/dev/null - git rev-parse --verify HEAD | cut -c1-7 + git rev-parse --verify HEAD >out && + cut -c1-7 out cd "$owd" } commit_file () { @@ -125,7 +126,8 @@ commit_file sm1 && head3=$( cd sm1 && git reset --hard HEAD~2 >/dev/null && - git rev-parse --verify HEAD | cut -c1-7 + git rev-parse --verify HEAD >out && + cut -c1-7 out ) test_expect_success 'modified submodule(backward)' " From patchwork Wed Aug 12 19:27:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11711221 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 250A2138C for ; Wed, 12 Aug 2020 19:28:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C7A220838 for ; Wed, 12 Aug 2020 19:28:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bAEs0OMI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726596AbgHLT2A (ORCPT ); Wed, 12 Aug 2020 15:28:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbgHLT17 (ORCPT ); Wed, 12 Aug 2020 15:27:59 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D08CC061383 for ; Wed, 12 Aug 2020 12:27:59 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id k13so1533768plk.13 for ; Wed, 12 Aug 2020 12:27:59 -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=gnkeBFn0/X4+bdWVmRgOycuxQRZnmkU8s6cdQqnTQ4w=; b=bAEs0OMIxBWP+14nfZp1lcFUf/OWaV+VEQZIlXodNprbuK4BpJ1EktV/fxOx3cy7Pp 3oiYyq1XnvN6f+xLdgmgTzl3cw4t1nTdVMGX1bGN/893nWDi63nzKx5BzNUyfVfaL+C6 8wzi70SIP74x5Q0c5Gi5wJBqXRlJee24vC4HChSHHbwhmAMr0i9EzVv78qNt0mJLOYIw 90zFvavvBuchFcE2vUA+9Y8CTeYHhZLtZEGwoZjd5m0Y8A5QrqIQIzHJfikPhVnOU9at qIliCiKILbnBN/5BKJxQTRNwMeWp3GYZuLFQth4QwXvW6kj1hMOWTlqKxLJ8Yh5YYDvS yI+w== 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=gnkeBFn0/X4+bdWVmRgOycuxQRZnmkU8s6cdQqnTQ4w=; b=MSHN5pA53HmrcVcG3sgAhf/4VCVlCNV1zBJdPFWGZoyKeOwgazBzX7ssK1A+NAVc3B 77pwxzpljxIRmoMnsOQiVfDsbja7f1QLY8SjUDBiwy+9fzjc+XL8G0iiqjZD9Ti89BE3 QzSrKNCP9kI3dh8WCRkPlcLrXnuPAPcWQedf1hlmNSEeREKnnKyTHf2uImPZmYavrL47 rEvjC+Ko1+a7RfpK5o6KOmhCRGuP6bdppidMqy9g8H4c3El0/ooZ3R3wM0QyX+45MaTt fEFt7qWdAVeh5Dw5lVxKTRBveZPkHD39nyeYiggcStgCTtWJsaLGzccO48T4thsBlKB7 J0+A== X-Gm-Message-State: AOAM53233ENR09gUVPsaLxMyq7M8nTgW7ZP6FNBnWK8NLyYeokr0YuV4 CM9ixUQnnhQdkDOOT2VAl6g= X-Google-Smtp-Source: ABdhPJxaiMtfYn5HmoxN5uRl5+xnvM8qNa5NNdARLGyRe+wAGcJ95TgfsjXG0w0aXAM+iEEglYwKjQ== X-Received: by 2002:a17:90b:14b:: with SMTP id em11mr1593480pjb.47.1597260479183; Wed, 12 Aug 2020 12:27:59 -0700 (PDT) Received: from localhost.localdomain ([45.127.46.132]) by smtp.gmail.com with ESMTPSA id f3sm3463334pfj.206.2020.08.12.12.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 12:27:58 -0700 (PDT) From: Shourya Shukla To: shouryashukla.oo@gmail.com Cc: christian.couder@gmail.com, git@vger.kernel.org, gitster@pobox.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, Christian Couder Subject: [PATCH v2 2/4] t7401: change test_i18ncmp syntax for clarity Date: Thu, 13 Aug 2020 00:57:35 +0530 Message-Id: <20200812192737.13971-3-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200812192737.13971-1-shouryashukla.oo@gmail.com> References: <20200805174921.16000-1-shouryashukla.oo@gmail.com> <20200812192737.13971-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 8ee78bcb69..53943c9cc9 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -183,7 +183,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' " @@ -193,7 +193,7 @@ test_expect_success 'typechanged submodule(submodule->blob), --files' " > Add foo5 EOF - test_i18ncmp actual expected + test_i18ncmp expected actual " rm -rf sm1 && @@ -204,7 +204,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 && @@ -217,7 +217,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 @@ -285,7 +285,7 @@ EOF test_expect_success '--for-status' " git submodule summary --for-status HEAD^ >actual && - test_i18ncmp actual - < X-Patchwork-Id: 11711223 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 45BD2138C for ; Wed, 12 Aug 2020 19:28:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24DCB2087C for ; Wed, 12 Aug 2020 19:28:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BRnfN4sf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726734AbgHLT2F (ORCPT ); Wed, 12 Aug 2020 15:28:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726696AbgHLT2E (ORCPT ); Wed, 12 Aug 2020 15:28:04 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03F7AC061383 for ; Wed, 12 Aug 2020 12:28:04 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id u128so1521961pfb.6 for ; Wed, 12 Aug 2020 12:28:04 -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=CsicD/rzFZ3xRwZOm6B78uZiPUQAuH9hwQ66exr7NtY=; b=BRnfN4sf5zFGyXbHl3aj9dwisHMcR40iTKtzeUgLjaub2lrQj3HVMKrd9+IULCaopQ 9+nJ/Hz1iKtQw46vPhCd5CCLovi/wplIPJi7ILvG3w98zVIyYYGa0eGx3Ln21ZAf7Djn jHDFzYGLFnH98tajeKeKTCJk8HzSw75gpNr5FPnZnLWgOCod+sAG+I0tFM2pbPEAdZ9H vZ14+zu4oSQY204ypy2smsHA1T86/25I9UZSQN/bc6rWfyWJ9/37sFJfc8okupp+FHxf osJ1nZ9ZWWNTVq+b/pqZFKvCIZXJ6iTwPDEQOdELjnN1mYAO7093viczjpux0tE+WSNE b2lg== 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=CsicD/rzFZ3xRwZOm6B78uZiPUQAuH9hwQ66exr7NtY=; b=N9XhzfhnHVU4FZy89p0fTBvlx7i6G6MilkLOgziCXNOhW2TKkqi/F48DRog3T6rMnB rVBroreeFErwl3HgbkFW/rTXAj6Vr1I7JYOjoADxUb/xBtz846Q2PmlKFpOWJdKrdyLu v7JRYz1rn89wiGRJGMtGfBQGDgobIhUvPJ2VgWhc5C9JF24tW2wl13J0dy9aebVOjNEY td3kk4ekBRdC9ZtTFOsaHcIyp1I74zdHEYesj4Jtlq19q8llrIplEeIevTsa5j/IjZlW m40+Ti32Rt9Rx1PBOsiLT+wiLyPWUVjqyL10nvFeRYhewG4TXWnNZPZhqEwImzX39Ecc 508A== X-Gm-Message-State: AOAM531r/WEMtmBXHT7tulJDQoQ+DBBffKz0LZdb5eBJ6um4tu5mnFUR maGYVGiJiEhIv5Neww1xvv0= X-Google-Smtp-Source: ABdhPJx+NDAxycueV3uQUNlb/mqy2N0mFfpkfA21CMBJ2ZRGKGRI8zuJGIFff1oiPKeQNuC+Fzbp3Q== X-Received: by 2002:a62:7b4e:: with SMTP id w75mr986017pfc.130.1597260482831; Wed, 12 Aug 2020 12:28:02 -0700 (PDT) Received: from localhost.localdomain ([45.127.46.132]) by smtp.gmail.com with ESMTPSA id f3sm3463334pfj.206.2020.08.12.12.27.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 12:28:02 -0700 (PDT) From: Shourya Shukla To: shouryashukla.oo@gmail.com Cc: christian.couder@gmail.com, git@vger.kernel.org, gitster@pobox.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, Christian Couder , Taylor Blau Subject: [PATCH v2 3/4] t7401: change indentation for enhanced readability Date: Thu, 13 Aug 2020 00:57:36 +0530 Message-Id: <20200812192737.13971-4-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200812192737.13971-1-shouryashukla.oo@gmail.com> References: <20200805174921.16000-1-shouryashukla.oo@gmail.com> <20200812192737.13971-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. 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 | 128 +++++++++++++++++------------------ 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index 53943c9cc9..dd0e88fc6a 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -39,10 +39,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 " @@ -53,10 +53,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 " @@ -74,10 +74,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 " @@ -87,20 +87,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 " @@ -111,10 +111,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 && @@ -133,11 +133,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 " @@ -146,25 +146,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 " @@ -179,20 +179,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 " @@ -201,9 +201,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 " @@ -213,10 +213,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 " @@ -224,10 +224,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 " @@ -236,9 +236,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 " @@ -251,22 +251,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 " @@ -274,24 +274,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 <<-EOF -* sm1 $head6...0000000: + * sm1 $head6...0000000: -* sm2 0000000...$head7 (2): - > Add foo9 + * sm2 0000000...$head7 (2): + > Add foo9 -EOF + EOF " test_expect_success 'fail when using --files together with --cached' " From patchwork Wed Aug 12 19:27:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shourya Shukla X-Patchwork-Id: 11711227 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 45154618 for ; Wed, 12 Aug 2020 19:28:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C29620866 for ; Wed, 12 Aug 2020 19:28:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kZXM6Hto" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726745AbgHLT2H (ORCPT ); Wed, 12 Aug 2020 15:28:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726696AbgHLT2G (ORCPT ); Wed, 12 Aug 2020 15:28:06 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5DFDC061383 for ; Wed, 12 Aug 2020 12:28:06 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id s15so1545628pgc.8 for ; Wed, 12 Aug 2020 12:28: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=qZ5o/8amuzEkI1Dpols2p18x4/Z9qXPbUQGVNkP9FGA=; b=kZXM6HtoVOLrkKJbFWbiw/4WmfMa8PIgv07vKw358cSkbi+11FVdvNxPbnq8Vn7fdY bYCEc7Hhwgnf6klULeBusV+KaYWEEJsVkBfuAioICOraCvHcCzbsPhcdbeeU38IlihCl 4+EqdgS6yuZJEprSPjdFlG6bsLlv/DernhSLn4vpQJn8TIZW6k4X7F6PfCb0ilZK1hEP Dm9E5DrCeN9xnEQ1FjnDWqCe6MScFbkxShwzNv0LjkCKuDHBTOMqjQ7DKKNWULueTFgo SeUKRnyReNqd4dZKc1bu4nwjU0Huy8FTt78+mKD1NwgTBY1gx4ajGNcv95gWITKNphOK hR4g== 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=qZ5o/8amuzEkI1Dpols2p18x4/Z9qXPbUQGVNkP9FGA=; b=YGp3igIO0wAhBhGTLgPR2C2vAUAKI+4iNCbKL6WDCS+Yl7P26KeQsXK55svPw1nDOQ 0LVLam7aXs2bep3S0BDcgRR5Cuofb60Fn4Mk06qE2fTliOPPocz7dmF8MOmIUmzL5/Po lu1iJzBS3f7Z/0mT8ZbsE4QPWTYbx1OTKkRtaSj3epM64TzH5vhylsJ4ZLG8d3byPXJ5 /yrbvY8Fv9PDQUwwPM3zuc2XqqPIC7feYx4WHYO02w8XjROMw7D39kXmZEW3oq/hc8j+ Y92pI85sp2nBEu80aEJRgIU5CNuWr2bhthNLuiZXu+Ago01KzSI+4HbW6zE3yO5Kb0uP 0Xtg== X-Gm-Message-State: AOAM531hM98kMVQqbCX19x0M4pAgCFYN1ZGSWPYZlXocbjE5Fphto8M1 LoJkZxs4zFOE5lW30tzBxyc= X-Google-Smtp-Source: ABdhPJxtnmfK0tIRnfizogx8QVjGhJZo3J3UKsjPcOrfe4OK7b8HcInRTWSBfhLp3e3MOJh8A0IAOg== X-Received: by 2002:a62:7b43:: with SMTP id w64mr952870pfc.282.1597260486368; Wed, 12 Aug 2020 12:28:06 -0700 (PDT) Received: from localhost.localdomain ([45.127.46.132]) by smtp.gmail.com with ESMTPSA id f3sm3463334pfj.206.2020.08.12.12.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 12:28:05 -0700 (PDT) From: Shourya Shukla To: shouryashukla.oo@gmail.com Cc: christian.couder@gmail.com, git@vger.kernel.org, gitster@pobox.com, Johannes.Schindelin@gmx.de, kaartic.sivaraam@gmail.com, liu.denton@gmail.com, Christian Couder , Taylor Blau Subject: [PATCH v2 4/4] t7401: add a NEEDSWORK Date: Thu, 13 Aug 2020 00:57:37 +0530 Message-Id: <20200812192737.13971-5-shouryashukla.oo@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200812192737.13971-1-shouryashukla.oo@gmail.com> References: <20200805174921.16000-1-shouryashukla.oo@gmail.com> <20200812192737.13971-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 dd0e88fc6a..8f5e4515d3 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 since +# there are lots of commands taking place outside of 'test_expect_success' +# block, which is no longer in good-style. . ./test-lib.sh