Skip to content

Commit

Permalink
Prevent making commits to remote tracking branches.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Wang committed Mar 26, 2013
1 parent 171ff70 commit ea8f028
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions js/historyview.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,15 +665,20 @@ define(['d3'], function () {
},

_setCurrentBranch: function (branch) {
var display = this.svg.select('text.current-branch-display');
var display = this.svg.select('text.current-branch-display'),
text = 'Current Branch: ';

if (branch) {
display.text('Current Branch: ' + branch);
} else {
display.text('Current Branch: DETACHED HEAD');
text += branch;
this.currentBranch = branch;
}

if (!branch || branch.indexOf('origin/') === 0) {
text += ' (DETACHED HEAD)';
this.currentBranch = null;
}

this.currentBranch = branch;
display.text(text);
},

_moveTag: function (tag, ref) {
Expand Down

0 comments on commit ea8f028

Please sign in to comment.