From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id DEF5D1F453 for ; Fri, 18 Jan 2019 10:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726761AbfARKFi (ORCPT ); Fri, 18 Jan 2019 05:05:38 -0500 Received: from mout.gmx.net ([212.227.15.19]:57161 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbfARKFi (ORCPT ); Fri, 18 Jan 2019 05:05:38 -0500 Received: from [10.49.182.9] ([95.208.59.217]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LfSeH-1hYbwq0hw1-00p0pp; Fri, 18 Jan 2019 11:05:33 +0100 Date: Fri, 18 Jan 2019 11:05:17 +0100 (STD) From: Johannes Schindelin X-X-Sender: virtualbox@gitforwindows.org To: Junio C Hamano cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org Subject: Re: [PATCH v3 01/21] travis: fix skipping tagged releases In-Reply-To: Message-ID: References: <75ec97b3921f3ed346e9ab119ebff2546f03fade.1547645770.git.gitgitgadget@gmail.com> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K1:YyICCcoxyn7Q+bsa5qum6hdnGz7tBKzan89DsrJbUnWvVMeXfu2 jKrI4vaZPKx2jrJu96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SelUf1IjsxnZ+axjQsVSlnH039sBRdHPAAZx05f3Z7BRmny66AYvwR2EZ4H8sg8EQEq E9cnA8PKDPA== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Junio, On Thu, 17 Jan 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > Fix this by using TRAVIS_PULL_REQUEST_BRANCH (i.e. the *source branch*) > > when available, falling back to TRAVIS_BRANCH (i.e. for CI builds, also > > known as "push builds"). > > > > Signed-off-by: Johannes Schindelin > > --- > > ci/lib-travisci.sh | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/ci/lib-travisci.sh b/ci/lib-travisci.sh > > index 69dff4d1ec..d9d4f1a9d7 100755 > > --- a/ci/lib-travisci.sh > > +++ b/ci/lib-travisci.sh > > @@ -1,5 +1,9 @@ > > # Library of functions shared by all CI scripts > > > > +# When building a PR, TRAVIS_BRANCH refers to the *target* branch. Not what we > > +# want here. We want the source branch instead. > > +TRAVIS_BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" > > To those who are familiar with Travis [*1*], I suspect that > TRAVIS_BRANCH has a specific meaning (e.g. with PR, it is target > branch), and assigning a different value that is taken from another > variable with different meanings to TravisCI would confuse them. > > Perhaps introduce a new variable, like so... > > BRANCH_TO_BUILD="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" > > and then s/TRAVIS_BRANCH/BRANCH_TO_BUILD/g on the body of the > skip_branch_tip_with_tag helper function. I already introduce such a variable later in the same patch series: `CI_BRANCH`. It is a good idea to introduce that already here, as it declutters that later patch a bit, I would think. Will change, Dscho > > Thanks. > > > [Footnote] > > *1* I obviously am not among them; otherwise we would have caught > this while reviewing 09f5e974 ("travis-ci: skip a branch build if > equal tag is present", 2017-09-10). > > > > > > skip_branch_tip_with_tag () { > > # Sometimes, a branch is pushed at the same time the tag that points > > # at the same commit as the tip of the branch is pushed, and building >