git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] travis-ci: fix "skip_branch_tip_with_tag()" string comparison
@ 2017-09-21 20:48 larsxschneider
  2017-09-21 21:28 ` Jonathan Nieder
  0 siblings, 1 reply; 4+ messages in thread
From: larsxschneider @ 2017-09-21 20:48 UTC (permalink / raw)
  To: git; +Cc: szeder.dev, gitster, Lars Schneider

From: Lars Schneider <larsxschneider@gmail.com>

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>
---

Hi,

previous discussion:
https://public-inbox.org/git/3B175D35-5B1C-43CD-A7E9-85693335B10A@gmail.com/

Sorry that this trivial fix took so long.

Cheers,
Lars


Notes:
    Base Commit: a81423d7cf (a81423d7cfdc57238783f05394dddd1064c99165)
    Diff on Web: https://github.com/larsxschneider/git/commit/6b532a42f0
    Checkout:    git fetch https://github.com/larsxschneider/git travisci/fix-skip-branch-v1 && git checkout 6b532a42f0

 ci/lib-travisci.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci/lib-travisci.sh b/ci/lib-travisci.sh
index 9c4ae9bdd0..c3b46f4a7d 100755
--- 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" ]
 	then
 		echo "Tip of $TRAVIS_BRANCH is exactly at $TAG"
 		exit 0
--
2.14.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-22  1:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-09-22  1:57     ` Junio C Hamano

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 NNTP newsgroup(s).