From e29896718ea5aa8ee3c40c75068081c75533958e Mon Sep 17 00:00:00 2001 From: Johannes Lerch Date: Fri, 16 Mar 2018 15:47:08 +0100 Subject: [PATCH] Replacing checks for '/' in branch names by checks for "origin/" --- js/historyview.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/historyview.js b/js/historyview.js index 7687ac1..1979c71 100644 --- a/js/historyview.js +++ b/js/historyview.js @@ -860,7 +860,7 @@ define(['d3'], function() { for (b = 0; b < this.branches.length; b++) { branch = this.branches[b]; - if (branch.indexOf('/') === -1) { + if (!branch.startsWith("origin/")) { commit = this.getCommit(branch); parent = this.getCommit(commit.parent); parent2 = this.getCommit(commit.parent2); @@ -916,7 +916,7 @@ define(['d3'], function() { var classes = 'branch-tag'; if (d.name.indexOf('[') === 0 && d.name.indexOf(']') === d.name.length - 1) { classes += ' git-tag'; - } else if (d.name.indexOf('/') >= 0) { + } else if (d.name.startsWith("origin/")) { classes += ' remote-branch'; } else if (d.name.toUpperCase() === 'HEAD') { classes += ' head-tag'; @@ -963,7 +963,7 @@ define(['d3'], function() { var display = this.svg.select('text.current-branch-display'), text = 'HEAD: '; - if (branch && branch.indexOf('/') === -1) { + if (branch && !branch.startsWith("origin/")) { text += branch; this.currentBranch = branch; } else {