From patchwork Mon Oct 5 08:56:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11816313 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 A1C666CB for ; Mon, 5 Oct 2020 08:56:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 804C020795 for ; Mon, 5 Oct 2020 08:56:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="o9IQpNFj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726058AbgJEI4k (ORCPT ); Mon, 5 Oct 2020 04:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbgJEI4k (ORCPT ); Mon, 5 Oct 2020 04:56:40 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF7A9C0613A7 for ; Mon, 5 Oct 2020 01:56:39 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id g12so3161595wrp.10 for ; Mon, 05 Oct 2020 01:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=as30vl3Zo6S/X7oaMG157bBNNCILcbMFyUp1hWFX5tY=; b=o9IQpNFjJq4rrHZKyHMXlFzSWwS40cnDY+KWeKOwJ9iGLTC03iL0juO+gp0RZdB2EK MkAwnKqNsFELREahSKxKx2HBZW4w+grcQwZGqMmJ87jI1sT9LxJ5qx91HwQrRxE5f+Mf banTc2wMBcDVAo3rlret0z1x4XGm3hM+k/AIUxPApuPSY5ZoNuvVpSmao09GdJUqMxzu NAQgzeqRT85L/OkzvkPQgS95M8/xA/1ajmMUV/YQLJxoXZurcL45OkeyN4mm0nVPBJ1f /vCjuvonNr/58TT83Ij6epc5BjzH/5MgoTJM116oSOVrEBF6IMSiyHCCFkVIWAzyKmoR kF2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=as30vl3Zo6S/X7oaMG157bBNNCILcbMFyUp1hWFX5tY=; b=kK2ocuvavWq4xHATnx0irx++D9I+98mZKKdQ0Z8CdMej0NCZ4pXmxy3AqEnQlPFIAo UzqlszDT9JzbA/hV5kt8N037Gy9BW62cDnsy+JqsbNABqs7eLwTLMEZ5KB8496vvxdVG EcWxBHsjtMHW5RxtWHfy/ujm7K5/WpzrzEcir8pJfZ4awPnJXD3gLXcZ0CxFus4RbS4/ jCSiD0LrmmBFGZDKTUYaG2MUx2oLMcke2LSCNDfJCYikerd1IIyBh4UWoetMnM6Im62j KoDoIW755lljxd8a6mFJIQAHayaHipmbeGMfdClO1VgbCevB3D014vxrZ3eHDcJg3cBc DdpQ== X-Gm-Message-State: AOAM532AUEuqshdjvM8kU59nZ3s1suDataP1r0nI0UvYCZ7hNjEbzhNs pzT6J2Khe6f1Ew+gUp+zIS30xGMq9yw= X-Google-Smtp-Source: ABdhPJyASjNgDpqLqsrzn4FhyIcF+iipjdH05hgXX4VoUAJctskp3vCLCFQeFG41jCO7tsDKNdPGyw== X-Received: by 2002:a5d:69cd:: with SMTP id s13mr16022221wrw.379.1601888198462; Mon, 05 Oct 2020 01:56:38 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id u2sm13314095wre.7.2020.10.05.01.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 01:56:38 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 05 Oct 2020 08:56:35 +0000 Subject: [PATCH 1/2] t1415: avoid using `main` as ref name Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin In preparation for a patch series that will change the fall-back for `init.defaultBranch` to `main`, let's not use `main` as ref name in this test script. Since we already use the name "second" for a secondary worktree that is created in this test, let's use the name "first" for those refs instead. While at it, adjust the test titles where "repo" was used by mistake instead of the term "worktree". Signed-off-by: Johannes Schindelin --- t/t1415-worktree-refs.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/t/t1415-worktree-refs.sh b/t/t1415-worktree-refs.sh index bb2c7572a3..7ab91241ab 100755 --- a/t/t1415-worktree-refs.sh +++ b/t/t1415-worktree-refs.sh @@ -76,24 +76,24 @@ test_expect_success 'reflog of worktrees/xx/HEAD' ' test_cmp expected actual.wt2 ' -test_expect_success 'for-each-ref from main repo' ' +test_expect_success 'for-each-ref from main worktree' ' mkdir fer1 && git -C fer1 init repo && test_commit -C fer1/repo initial && git -C fer1/repo worktree add ../second && - git -C fer1/repo update-ref refs/bisect/main HEAD && - git -C fer1/repo update-ref refs/rewritten/main HEAD && - git -C fer1/repo update-ref refs/worktree/main HEAD && - git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual && + git -C fer1/repo update-ref refs/bisect/first HEAD && + git -C fer1/repo update-ref refs/rewritten/first HEAD && + git -C fer1/repo update-ref refs/worktree/first HEAD && + git -C fer1/repo for-each-ref --format="%(refname)" | grep first >actual && cat >expected <<-\EOF && - refs/bisect/main - refs/rewritten/main - refs/worktree/main + refs/bisect/first + refs/rewritten/first + refs/worktree/first EOF test_cmp expected actual ' -test_expect_success 'for-each-ref from linked repo' ' +test_expect_success 'for-each-ref from linked worktree' ' mkdir fer2 && git -C fer2 init repo && test_commit -C fer2/repo initial && From patchwork Mon Oct 5 08:56:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila_via_GitGitGadget?= X-Patchwork-Id: 11816317 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 5DE261752 for ; Mon, 5 Oct 2020 08:56:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D4CA207F7 for ; Mon, 5 Oct 2020 08:56:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CMTajaze" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726068AbgJEI4l (ORCPT ); Mon, 5 Oct 2020 04:56:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbgJEI4k (ORCPT ); Mon, 5 Oct 2020 04:56:40 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95A1AC0613CE for ; Mon, 5 Oct 2020 01:56:40 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id z1so8587014wrt.3 for ; Mon, 05 Oct 2020 01:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=Yj1zqNMdHeggohychXFKVqJMwKP4BeVwpR6QHBw/MW8=; b=CMTajazeK1CJTUO6UXofxGoZrDQOHWvEaICVKbtJ8sGXhn7SWHoaqvPtdiIPYCOPn9 nDvyOJuXYbhp1/Trwrkt87I2qRncV9ZqeclnTDzmmMUopsH0VNy9n9tku3C0wwaAtudE N7cDOvUjhDDM/UTh0YCdd3xjpSPaQAF7UwSLOJSTchVoHvxdX2yw5Zh/BZG/xu98AxVz EwkXEzRZ6K6Zg/IfD3AAOIc1p9V9DIKXxpUoveRCMwVuUBs97Hphs/kmeAjdNM8y5T0C kCPJTguq312LAwKeXbq/T9athaAEdXnpcJSk89MS16eSvntnVOhOqklXcJV5ZZ6zF99T rcpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=Yj1zqNMdHeggohychXFKVqJMwKP4BeVwpR6QHBw/MW8=; b=tgyL91f/byOsbNuJ36v8FPln3ImKMz1zb9fc+h56VCfOuhSQR4M8jxTHmGc5NIhP1k /JcLa0OdOOtSSR95nQi3GKkGuzFS82P1sgaSx5ZHnMkNlbO9R5owsY3XEqdoA1cU4ioO eq8aO2U4KMiWFzAbrb6XQ65YiFAy6NJZqmVTlSW2V97jwnClXddKkiqSIy/zOVIzb2ht Hyd1lgKoJaH/dzUAyOLjLt7DsX7GLJ9zFpH+SDPnCVUzNjlxzAz/E2wfUoBJnRgNpgs/ IfSDD+ygtbATypvWwdlgVwQVVUwWN/4rbHX3S06q8o6i9CIm03oQYFJlEUWx4MQZ5MAY 3PwQ== X-Gm-Message-State: AOAM532Ucqf2vlI/TEcKOAzCFYp3AryMP7T0lKPtFQwLUF3xxbHXehUm Vd0NrzpggTS1BzoxRplb/qn8HHqEZNE= X-Google-Smtp-Source: ABdhPJxc56sXs33uNQiS9pPzHoSQU4bHQ5JepQaXKAY9B6WjeGPZEh6hOfibgD29kYnmTwXn5VmVfQ== X-Received: by 2002:adf:97cb:: with SMTP id t11mr10983724wrb.292.1601888199171; Mon, 05 Oct 2020 01:56:39 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id o15sm11748613wmh.29.2020.10.05.01.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 01:56:38 -0700 (PDT) Message-Id: <6045ceb938836355b7d43bc2088ca2504b05dde4.1601888196.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 05 Oct 2020 08:56:36 +0000 Subject: [PATCH 2/2] tests: avoid using the branch name `main` Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin In the near future, we want to change Git's default branch name to `main`. In preparation for that, stop using it as a branch name in the test suite. Replace that branch name by `primary`. Signed-off-by: Johannes Schindelin --- t/t6012-rev-list-simplify.sh | 8 ++++---- t/t6400-merge-df.sh | 8 ++++---- t/t6409-merge-subtree.sh | 12 ++++++------ t/t6430-merge-recursive.sh | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh index b6fa43ace0..f1296c29e6 100755 --- a/t/t6012-rev-list-simplify.sh +++ b/t/t6012-rev-list-simplify.sh @@ -171,7 +171,7 @@ test_expect_success '--full-diff is not affected by --parents' ' test_expect_success 'rebuild repo' ' rm -rf .git * && git init && - git switch -c main && + git switch -c primary && echo base >file && git add file && @@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' ' git add file && test_commit B && - git switch main && + git switch primary && test_must_fail git merge -m "M" B && echo A >file && echo B >>file && @@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' ' git merge -m R -Xtheirs X && note R && - git switch main && + git switch primary && git merge -m N R && note N && @@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' ' git add z && test_commit Z && - git switch main && + git switch primary && git merge -m O Z && note O && diff --git a/t/t6400-merge-df.sh b/t/t6400-merge-df.sh index 400a4cd139..15f540aae3 100755 --- a/t/t6400-merge-df.sh +++ b/t/t6400-merge-df.sh @@ -124,7 +124,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' ' git add . && git commit -m initial && - git branch main && + git branch primary && git branch other && git checkout other && @@ -132,10 +132,10 @@ test_expect_success 'Simple merge in repo with interesting pathnames' ' git add -u && git commit -m other && - git checkout main && - echo main >foo/bar/baz && + git checkout primary && + echo primary >foo/bar/baz && git add -u && - git commit -m main && + git commit -m primary && git merge other && git ls-files -s >out && diff --git a/t/t6409-merge-subtree.sh b/t/t6409-merge-subtree.sh index 793f0c8bf3..c236180238 100755 --- a/t/t6409-merge-subtree.sh +++ b/t/t6409-merge-subtree.sh @@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' ' test_commit foo ' -test_expect_success 'setup branch main' ' - git checkout -b main master && +test_expect_success 'setup branch primary' ' + git checkout -b primary master && git merge -s ours --no-commit --allow-unrelated-histories sub && git read-tree --prefix=dir/ -u sub && - git commit -m "initial merge of sub into main" && + git commit -m "initial merge of sub into primary" && test_path_is_file dir/foo.t && test_path_is_file hello ' @@ -49,9 +49,9 @@ test_expect_success 'update branch sub' ' test_commit bar ' -test_expect_success 'update branch main' ' - git checkout main && - git merge -s subtree sub -m "second merge of sub into main" && +test_expect_success 'update branch primary' ' + git checkout primary && + git merge -s subtree sub -m "second merge of sub into primary" && test_path_is_file dir/bar.t && test_path_is_file dir/foo.t && test_path_is_file hello diff --git a/t/t6430-merge-recursive.sh b/t/t6430-merge-recursive.sh index d48d211a95..900e5c63a7 100755 --- a/t/t6430-merge-recursive.sh +++ b/t/t6430-merge-recursive.sh @@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' ' test_expect_success 'merging with triple rename across D/F conflict' ' git reset --hard HEAD && - git checkout -b main && + git checkout -b primary && git rm -rf . && echo "just a file" >sub1 && @@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' ' test_tick && git commit -a -m changesimplefile && - git checkout main && + git checkout primary && git rm sub1 && git mv sub2 sub1 && test_tick &&