Skip to content

Commit

Permalink
Checking out a remote tracking branch should result in detached head.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei Wang committed Mar 27, 2013
1 parent 4a9c737 commit ea712b8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions js/historyview.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,13 +674,11 @@ define(['d3'], function () {
var display = this.svg.select('text.current-branch-display'),
text = 'Current Branch: ';

if (branch) {
if (branch && branch.indexOf('/') === -1) {
text += branch;
this.currentBranch = branch;
}

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

Expand Down

0 comments on commit ea712b8

Please sign in to comment.