From: Lars Schneider <larsxschneider@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, szeder.dev@gmail.com, gitster@pobox.com
Subject: Re: [PATCH v1] travis-ci: fix "skip_branch_tip_with_tag()" string comparison
Date: Fri, 22 Sep 2017 00:26:44 +0200 [thread overview]
Message-ID: <4FC081C4-355E-4E62-8CD8-89C299485182@gmail.com> (raw)
In-Reply-To: <20170921212848.GJ27425@aiede.mtv.corp.google.com>
> On 21 Sep 2017, at 23:28, Jonathan Nieder <jrnieder@gmail.com> wrote:
>
> larsxschneider@gmail.com wrote:
>
>> 09f5e97 ("travis-ci: skip a branch build if equal tag is present",
>> 2017-09-17) introduced the "skip_branch_tip_with_tag" function with
>> a broken string comparison. Fix it!
>>
>> Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
>> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
>> ---
>
> Thanks for the fix.
>
> 09f5e97 appears to be for the ls/travis-scriptify branch, which is
> already part of "next" (if it weren't, I'd suggest just squashing your
> patch into that commit).
>
>> --- a/ci/lib-travisci.sh
>> +++ b/ci/lib-travisci.sh
>> @@ -14,7 +14,7 @@ skip_branch_tip_with_tag () {
>> # of a tag.
>>
>> if TAG=$(git describe --exact-match "$TRAVIS_BRANCH" 2>/dev/null) &&
>> - $TAG != $TRAVIS_BRANCH
>> + [ "$TAG" != "$TRAVIS_BRANCH" ]
>
> Git style is to use 'test' instead of '[' for this. See
> https://public-inbox.org/git/2f3cdc85-f051-c0ae-b9db-fd13cac78aed@gmail.com/
> for more on that subject.
Oh, you're right!
> Could you squash in the following?
@Junio: Can you squash it when you apply the patch?
Thank you,
Lars
>
> Thanks,
> Jonathan
>
> diff --git i/ci/lib-travisci.sh w/ci/lib-travisci.sh
> index c3b46f4a7d..b3ed0a0dda 100755
> --- i/ci/lib-travisci.sh
> +++ w/ci/lib-travisci.sh
> @@ -14,7 +14,7 @@ skip_branch_tip_with_tag () {
> # of a tag.
>
> if TAG=$(git describe --exact-match "$TRAVIS_BRANCH" 2>/dev/null) &&
> - [ "$TAG" != "$TRAVIS_BRANCH" ]
> + test "$TAG" != "$TRAVIS_BRANCH"
> then
> echo "Tip of $TRAVIS_BRANCH is exactly at $TAG"
> exit 0
next prev parent reply other threads:[~2017-09-21 22:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-21 20:48 [PATCH v1] travis-ci: fix "skip_branch_tip_with_tag()" string comparison larsxschneider
2017-09-21 21:28 ` Jonathan Nieder
2017-09-21 22:26 ` Lars Schneider [this message]
2017-09-22 1:57 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FC081C4-355E-4E62-8CD8-89C299485182@gmail.com \
--to=larsxschneider@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).