git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v1] travis-ci: fix "skip_branch_tip_with_tag()" string comparison

From
larsxschneider@gmail.com <larsxschneider@gmail.com>
Date
Sep 21, 2017, 20:48 UTC
Message-ID
<20170921204830.66831-1-larsxschneider@gmail.com>
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
Next: Jonathan Nieder
Message 1 of 4 in “travis-ci: fix "skip_branch_tip_with_tag()" string comparison”
  1. travis-ci: fix "skip_branch_tip_with_tag()" string comparisonlarsxschneider@gmail.com, Sep 21, 2017
  2. Jonathan NiederSep 21, 2017
  3. Lars SchneiderSep 21, 2017
  4. Junio C HamanoSep 22, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.