From patchwork Sun Nov 27 14:51:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Xin X-Patchwork-Id: 13056796 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EE77C4332F for ; Sun, 27 Nov 2022 14:51:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229534AbiK0Ovj (ORCPT ); Sun, 27 Nov 2022 09:51:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiK0Ovi (ORCPT ); Sun, 27 Nov 2022 09:51:38 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20E49F58F for ; Sun, 27 Nov 2022 06:51:38 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id w15-20020a17090a380f00b0021873113cb4so8089115pjb.0 for ; Sun, 27 Nov 2022 06:51:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CjJoiXSis0CEI6gdhEn9ZXxw1w8vMbCF2c1knrNxcP8=; b=S7X+R2I9Ar12ty9osjTgD/RXVzemGnVkOV1o8hWk3LH7rrL0N9+dLL9mJY+P8GcfDb d1BJyw/ruJrcs+X6BOJsePlkIFPnxKNBrZqamv/3r8mgK5B5ym64npJKBncabL+MjuQF sIB71ngDYEtdpFebH0nKZ3ZgxXqr5+QOaEN6qWKUuLuU+5mLsVb57uPGcffhJvU+qj5w OQzLbKc+0HDk0j2EpQxyAZZmj7K6CWJsI297aaul+nkqVZHvmjKoq+isPTWLFSJNnvow Kz5FB6+xUKDVAuPvNRCSy09FG6DXIE854B7+1dJ2RkAQTpGusb7S8Jf7T7V532RAGeYY vshQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CjJoiXSis0CEI6gdhEn9ZXxw1w8vMbCF2c1knrNxcP8=; b=5ZkzS0Hx3rC8OwzyMLloxKZAgBoFglQ2yY2cwE/nn6BEqcMXByNuoZLqsRzW2sMZbK IwcBQGsmMFAwLSVFKVoGTeQChaCJ3kkcZxb/9pn5XNknBJuMDgPT75UQV8dFCi8owz5m 10HFTaDAbxMYi3jUVKeEDO6KDlMgY3Uo+yT+Wn2ivh6AAJEldGL591/bhZanlvc3WCch 21lLus6TVrgLY8CNMSlFn7jvMk1i/QlhzZSGMgsdixxSeHTiMF9Bbit30ly1QywcW1LS Rxxc8I8YKBncLzuG77yJMA9PNjP40o4WP3BtFpDxlgcyincrtLtJGR+9WhcAfYfhTfNK xY7g== X-Gm-Message-State: ANoB5pm7t0oSJfHmjo+dZj3Ez8oqbqbVdvm8Toj+Di4VhIKBm/H1OVsi DLqutrqnvOmT8qqUvgKEthA9XoYBiZI= X-Google-Smtp-Source: AA0mqf6OsQlzzuNS8MtA7a4JWBli25NeoRVojV+8vVHG5rHj69QmcjF+hws2aPwPz3wj6KI5IvcskA== X-Received: by 2002:a17:90b:3c8d:b0:20a:6468:9bf0 with SMTP id pv13-20020a17090b3c8d00b0020a64689bf0mr51146722pjb.31.1669560697472; Sun, 27 Nov 2022 06:51:37 -0800 (PST) Received: from tigtog-proxy.localdomain.localdomain (144.34.163.219.16clouds.com. [144.34.163.219]) by smtp.gmail.com with ESMTPSA id i8-20020a17090a058800b002137d3da760sm7915050pji.39.2022.11.27.06.51.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Nov 2022 06:51:36 -0800 (PST) From: Jiang Xin To: Git List , Junio C Hamano , =?utf-8?b?Tmd1eeG7hW4gVGjDoWkgTmfhu41jIER1eQ==?= Cc: Jiang Xin , Jiang Xin Subject: [PATCH v1 1/4] t1301: fix wrong template dir for git-init Date: Sun, 27 Nov 2022 22:51:27 +0800 Message-Id: <20221127145130.16155-1-worldhello.net@gmail.com> X-Mailer: git-send-email 2.32.0.rc3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jiang Xin The template dir parepared in test case "forced modes" is not used as expected because a wrong template dir is provided to "git init". This is because the $CWD for "git-init" command is a sibling directory alongside the template directory. Change it to the right template directory and add a protection test using "test_path_is_file". The wrong template directory was introduced by mistake in commit e1df7fe43f (init: make --template path relative to $CWD, 2019-05-10). Signed-off-by: Jiang Xin --- t/t1301-shared-repo.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 93a2f91f8a..7578e75d77 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -140,7 +140,8 @@ test_expect_success POSIXPERM 'forced modes' ' ( cd new && umask 002 && - git init --shared=0660 --template=templates && + git init --shared=0660 --template=../templates && + test_path_is_file .git/hooks/post-update && >frotz && git add frotz && git commit -a -m initial && From patchwork Sun Nov 27 14:51:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Xin X-Patchwork-Id: 13056797 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DA8BC4332F for ; Sun, 27 Nov 2022 14:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbiK0Ovs (ORCPT ); Sun, 27 Nov 2022 09:51:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiK0Ovr (ORCPT ); Sun, 27 Nov 2022 09:51:47 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8877CFAC1 for ; Sun, 27 Nov 2022 06:51:46 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id b11so7299810pjp.2 for ; Sun, 27 Nov 2022 06:51:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZoVKrJO0pYuCyTNyU844RV7OS+GgoOb5atv+h4IDKGA=; b=ON2IuVYNoHxwgLuO3l2+0C3Ytypwd8xGxRsGQ12D2hCCQ6K0HqpH+gjfeTeHmvJk70 AJ+KYfrNLihI2qih32lY4Hxl/u3cfyMVe4a4aBHf6T2Uv5/G9OejYCQlfS+yU79c7oeE 6n83IGVigsHEKQtzDYfB4I5BAC3zOydh18hyH4Xj7KWTWrwkYGTruOqpIlG4kMUk/X2h 2k83eR+urgeRAAUeu/W374V+GKoImKpWPbShaALdAxw9X4xxebMSzNu7K/hUJt/RvTZw wF05LCuQSObKFUKULV72RuRVWJ7OyAWsfdYnn1Fyv7N3JlwF2s+gjzmSrdNKmh+O5eh9 WTqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZoVKrJO0pYuCyTNyU844RV7OS+GgoOb5atv+h4IDKGA=; b=0CLhGQBYgsOXMTIzAzF97WhqIkYLvZdAk7gh1Z6a6jr5Inq4OOxGUoPp2OpyD8e4n6 jrEJppfnJ7x66fZ4AbtBg+eDTmNxAxBXVD7TwIlwPZDcZCQiY0S+KA1RhUEuxR+8/1qb tgjG0Ix5lpiGYRiuGagTxjxICeTX7bteZd2S5qo37y1FcYfG5D1VsGq8bevwQtCGgonj 2EAjx9uhOx351tg1IzsaxSCBIUrBN1oM4HpfxJr0nt6uPGhKO6xocry/FxQlvZly6O5x h1O6qRGU/GZOik3P8nup4DaUyyQdsP4YkX4aCKWKvV4URuetGulAEzyeYAMWv3ZYEXDD b8Iw== X-Gm-Message-State: ANoB5pmmf+RUBU64eMtouXfAewUP+wzEoBjYPjCBMGBkgY/kPMsaBg97 TKGIA/d40xR/a+6WaNS/YeCRn4qbCX4= X-Google-Smtp-Source: AA0mqf5cmmZ1FGeo0pAaBtt3oWmHvGwVUCS4n5O4Mgw+wsbAL6VaRpXhkzTFM6AJLazxRbX64nn4VA== X-Received: by 2002:a17:902:f114:b0:189:8001:b55b with SMTP id e20-20020a170902f11400b001898001b55bmr4291014plb.130.1669560705872; Sun, 27 Nov 2022 06:51:45 -0800 (PST) Received: from tigtog-proxy.localdomain.localdomain (144.34.163.219.16clouds.com. [144.34.163.219]) by smtp.gmail.com with ESMTPSA id i8-20020a17090a058800b002137d3da760sm7915050pji.39.2022.11.27.06.51.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Nov 2022 06:51:45 -0800 (PST) From: Jiang Xin To: Git List , Junio C Hamano Cc: Jiang Xin , Jiang Xin Subject: [PATCH v1 2/4] t1301: use test_when_finished for cleanup Date: Sun, 27 Nov 2022 22:51:28 +0800 Message-Id: <20221127145130.16155-2-worldhello.net@gmail.com> X-Mailer: git-send-email 2.32.0.rc3 In-Reply-To: <20221127145130.16155-1-worldhello.net@gmail.com> References: <20221127145130.16155-1-worldhello.net@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jiang Xin Signed-off-by: Jiang Xin --- t/t1301-shared-repo.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 7578e75d77..1225abbb6d 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -25,6 +25,7 @@ test_expect_success 'shared = 0400 (faulty permission u-w)' ' for u in 002 022 do test_expect_success POSIXPERM "shared=1 does not clear bits preset by umask $u" ' + test_when_finished "rm -rf sub" && mkdir sub && ( cd sub && umask $u && @@ -42,7 +43,6 @@ do ;; esac ' - rm -rf sub done test_expect_success 'shared=all' ' @@ -132,6 +132,7 @@ test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' ' ' test_expect_success POSIXPERM 'forced modes' ' + test_when_finished "rm -rf new" && mkdir -p templates/hooks && echo update-server-info >templates/hooks/post-update && chmod +x templates/hooks/post-update && @@ -174,6 +175,7 @@ test_expect_success POSIXPERM 'forced modes' ' ' test_expect_success POSIXPERM 'remote init does not use config from cwd' ' + test_when_finished "rm -rf child.git" && git config core.sharedrepository 0666 && umask 0022 && git init --bare child.git && @@ -193,7 +195,7 @@ test_expect_success POSIXPERM 're-init respects core.sharedrepository (local)' ' ' test_expect_success POSIXPERM 're-init respects core.sharedrepository (remote)' ' - rm -rf child.git && + test_when_finished "rm -rf child.git" && umask 0022 && git init --bare --shared=0666 child.git && test_path_is_missing child.git/foo && @@ -204,7 +206,7 @@ test_expect_success POSIXPERM 're-init respects core.sharedrepository (remote)' ' test_expect_success POSIXPERM 'template can set core.sharedrepository' ' - rm -rf child.git && + test_when_finished "rm -rf child.git" && umask 0022 && git config core.sharedrepository 0666 && cp .git/config templates/config && From patchwork Sun Nov 27 14:51:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Xin X-Patchwork-Id: 13056798 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03C84C4332F for ; Sun, 27 Nov 2022 14:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbiK0Ovy (ORCPT ); Sun, 27 Nov 2022 09:51:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbiK0Ovu (ORCPT ); Sun, 27 Nov 2022 09:51:50 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BF28F5B4 for ; Sun, 27 Nov 2022 06:51:50 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id mv18so7321413pjb.0 for ; Sun, 27 Nov 2022 06:51:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=s73inz+hL/qzrdnJIjod5Cw4978ryXX2X0AepTvKRZU=; b=YZDNlus3i6TQeBOMeVRdAT6PLlvdjJKraYgYhheg7DcxKT8MGrXUmm+Wz3j+hijUaK e9XwIdsTR0H0SjqL7VkzkhW8HvuOnPDCmpDACYNe6C1SIlg7jacB54BYQsIgB51sj9PZ oOyOHfdU0Tz8AI6yCA1FSIy0OYBKGG7g4zPnZIqBwInQBJMk5xQ3O1vK5OueRPSGZj4t V3yDDQByinS2so6C4l+YmtwgbzhBAWGvZ4mpGTXY8a1OVMYM37BtkJ46u+eeUUolclO0 JKsgQalgbMSMf1XYrCeJtKSnb+4ccHfqtwpWaM7nTxbZMOUfVgE6dnRK1BzoaZwbVNEL +Yiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s73inz+hL/qzrdnJIjod5Cw4978ryXX2X0AepTvKRZU=; b=oIZF2y8Br+AaLgxm4psWYMp5os34Wb6Tkglcjw7Pw88W8JUZmwP25Zn/LbLsoerfgo La7wAp/eLGfdRTqS1dvmetzWCcrbfyCWTV0iNUvneYsMplF580BxAJPOyoThE0FlDtDJ UTJN7pnma1AJx3w1zkHaCCGRoVxbnhIxH+sGcLJYbKeaQU/6YI5Vso6LKoVmE9oV/Ly/ SFcRm0T8FgbscibTlHvSH4awly5aprjBF1iWXCzUFjjNy8v504iNlYw/jjt5EHzTyXw5 tjDU5yh17Xi3ATLgHwaEI8QXp7lineNQkoHHzMG6nD6Bi98afyez1vP2MoIvvUyvgI6K zphA== X-Gm-Message-State: ANoB5pnKN9Z8Q9ut5GhHoe3ajmsvbuRvQNUQ3GyifO6eQsxSNoY41BQy 6mVw4bwisWWsGSIzXekYN8xBhUgAOBM= X-Google-Smtp-Source: AA0mqf6pRHXtbzm893Nqw+tlyh+Q33B7ABd38tHtLWkRCNiXIA7eX9ALtrHwBA1w77Dfjr+XH1Weog== X-Received: by 2002:a17:902:bd83:b0:180:87d7:9be8 with SMTP id q3-20020a170902bd8300b0018087d79be8mr40406456pls.85.1669560709496; Sun, 27 Nov 2022 06:51:49 -0800 (PST) Received: from tigtog-proxy.localdomain.localdomain (144.34.163.219.16clouds.com. [144.34.163.219]) by smtp.gmail.com with ESMTPSA id i8-20020a17090a058800b002137d3da760sm7915050pji.39.2022.11.27.06.51.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Nov 2022 06:51:48 -0800 (PST) From: Jiang Xin To: Git List , Junio C Hamano , Heikki Orsila Cc: Jiang Xin , Jiang Xin Subject: [PATCH v1 3/4] t1301: wrap the statements in the for loop Date: Sun, 27 Nov 2022 22:51:29 +0800 Message-Id: <20221127145130.16155-3-worldhello.net@gmail.com> X-Mailer: git-send-email 2.32.0.rc3 In-Reply-To: <20221127145130.16155-1-worldhello.net@gmail.com> References: <20221127145130.16155-1-worldhello.net@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jiang Xin Wrap the statements which were introduced in commit 06cbe85503 (Make core.sharedRepository more generic, 2008-04-16)) in the for loop in a new test case, so if we want to skip some of the test cases, these unwrapped statements won't affect the test cases we choose to run. Signed-off-by: Jiang Xin --- t/t1301-shared-repo.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 1225abbb6d..3ca91bf504 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -78,31 +78,28 @@ for u in 0660:rw-rw---- \ 0666:rw-rw-rw- \ 0664:rw-rw-r-- do - x=$(expr "$u" : ".*:\([rw-]*\)") && - y=$(echo "$x" | sed -e "s/w/-/g") && - u=$(expr "$u" : "\([0-7]*\)") && - git config core.sharedrepository "$u" && - umask 0277 && + test_expect_success POSIXPERM "set variables from $u" ' + x=$(expr "$u" : ".*:\([rw-]*\)") && + y=$(echo "$x" | sed -e "s/w/-/g") && + u=$(expr "$u" : "\([0-7]*\)") && + git config core.sharedrepository "$u" + ' test_expect_success POSIXPERM "shared = $u ($y) ro" ' - + umask 0277 && rm -f .git/info/refs && git update-server-info && actual="$(test_modebits .git/info/refs)" && verbose test "x$actual" = "x-$y" - ' - umask 077 && test_expect_success POSIXPERM "shared = $u ($x) rw" ' - + umask 077 && rm -f .git/info/refs && git update-server-info && actual="$(test_modebits .git/info/refs)" && verbose test "x$actual" = "x-$x" - ' - done test_expect_success POSIXPERM 'info/refs respects umask in unshared repo' ' From patchwork Sun Nov 27 14:51:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Xin X-Patchwork-Id: 13056799 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0683BC352A1 for ; Sun, 27 Nov 2022 14:51:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbiK0Ovz (ORCPT ); Sun, 27 Nov 2022 09:51:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiK0Ovx (ORCPT ); Sun, 27 Nov 2022 09:51:53 -0500 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 30299FAE3 for ; Sun, 27 Nov 2022 06:51:52 -0800 (PST) Received: by mail-pf1-x434.google.com with SMTP id b4so8198676pfb.9 for ; Sun, 27 Nov 2022 06:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PI4pjxpZ/4gX93Rdfsz03nhtqdNKssBQBmITP88Y+Fs=; b=qcfCQtlp44Q6K5A7Rbfoa/xnz7fv33hHWIckH+K5Mj0AH7ywGgCymZdsRjmOWzvdeh aIdHGuvEcgINkh3gUCWLhI2JtNepkuXfMb5fFhW+Pp+ElErEr/1LlNIVvEUkH7779OcT putcGKHJbrx+WLI2mjmhibTzBPBggatdwN9iBYhAC4kbJ/BCWJXXMfXkyy+ezib6DNEw bGPjmHoBQU8p9JjlF2Qi+cMYLzdSLXCH/3cijWVgBIaM99q4z/fa4M8xsvlUDBUiTrQe wTw1H27Bw/LlmR6gnt7+v71x3JF95eYeVknl2Pgi2LOai97Q9UF9SFEvgoUHVJP7R0YT vW6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PI4pjxpZ/4gX93Rdfsz03nhtqdNKssBQBmITP88Y+Fs=; b=QC8y5TH/vV0lSUvKCbYAwacZC55673wfwmIIY8ynKnQLH94IAqCvrucAG7HnHAKv2k cCSXBA83J82n8ecNouAxUoieRU7kwknQ9ritw4SHMiJUUuX0zG2nsNBRotImBcbkDL6J M4C/50zELdV+BpXaVH2dwPT643Luvp0Rzh2MMcDecMS5Rxn14zEv1F+wlJljXpkfXD95 VfoJ5riAO5gMWOLDHruUuWGFSGOqnmISiFyjv6sUB4pX82P3KngK5eybVJJlU+rvBd9b IxCUV4or32Q7ppWFliKCwutgnaesHrOuAy5aP9aB3NI9djoWHADlC+IJqozqaikLYoyA YVlQ== X-Gm-Message-State: ANoB5pn51aLR6gANbrmASkktRVGyDO28as8ScnngKFM2vna1OoxBthk0 pQFWO+/XFZFp6Qry5ddV4gBKB2be8Gs= X-Google-Smtp-Source: AA0mqf7UKMPnh4DOgoxqsCg4mxjN/Sq1esRADHH0dYfPivXgWU4oWWNa1N7LJtrTczqZJzgsbeDiCg== X-Received: by 2002:aa7:9882:0:b0:574:7931:98a3 with SMTP id r2-20020aa79882000000b00574793198a3mr18561546pfl.17.1669560711493; Sun, 27 Nov 2022 06:51:51 -0800 (PST) Received: from tigtog-proxy.localdomain.localdomain (144.34.163.219.16clouds.com. [144.34.163.219]) by smtp.gmail.com with ESMTPSA id i8-20020a17090a058800b002137d3da760sm7915050pji.39.2022.11.27.06.51.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Nov 2022 06:51:51 -0800 (PST) From: Jiang Xin To: Git List , Junio C Hamano , Johannes Schindelin Cc: Jiang Xin , Jiang Xin Subject: [PATCH v1 4/4] t1301: do not change $CWD in "shared=all" test case Date: Sun, 27 Nov 2022 22:51:30 +0800 Message-Id: <20221127145130.16155-4-worldhello.net@gmail.com> X-Mailer: git-send-email 2.32.0.rc3 In-Reply-To: <20221127145130.16155-1-worldhello.net@gmail.com> References: <20221127145130.16155-1-worldhello.net@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Jiang Xin In test case "shared=all", the working directory is permanently changed to the "sub" directory. This leads to a strange behavior that the temporary repositories created by subsequent test cases are all in this "sub" directory, such as "sub/new", "sub/child.git". If we bypass this test case, all subsequent test cases will have different working directory. Since the test case "shared=all" and all subsequent will work properly in the default test repository, we don't need to create and change to the "sub" directory in the test case "shared=all". Signed-off-by: Jiang Xin --- t/t1301-shared-repo.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/t/t1301-shared-repo.sh b/t/t1301-shared-repo.sh index 3ca91bf504..c4f2f72f6b 100755 --- a/t/t1301-shared-repo.sh +++ b/t/t1301-shared-repo.sh @@ -46,8 +46,6 @@ do done test_expect_success 'shared=all' ' - mkdir sub && - cd sub && git init --template= --shared=all && test 2 = $(git config core.sharedrepository) '