Skip to content

Commit 1594d9f

Browse files
committed
Review feedback
1 parent 14a9d40 commit 1594d9f

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

js/controlbox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ define(['d3'], function () {
181181
this.historyView.deleteBranch(name);
182182
break;
183183
default:
184-
if (arg.charAt(0) == '-') {
184+
if (arg.charAt(0) === '-') {
185185
this.error();
186186
} else {
187187
var remainingArgs = [arg].concat(args);
@@ -280,7 +280,7 @@ define(['d3'], function () {
280280

281281
merge: function (args) {
282282
var noFF = false;
283-
if (args.length == 2)
283+
if (args.length === 2)
284284
{
285285
var mergeSwitch = args.pop();
286286
if (mergeSwitch === '--no-ff') {

js/historyview.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ define(['d3'], function () {
9292
}
9393

9494
branchIndex = branches.indexOf(commit.id);
95-
96-
if (commit.isNoFFBranch === true) {
97-
branchIndex++;
98-
}
99-
if (commit.isNoFFCommit === true) {
100-
branchIndex--;
101-
}
95+
96+
if (commit.isNoFFBranch === true) {
97+
branchIndex++;
98+
}
99+
if (commit.isNoFFCommit === true) {
100+
branchIndex--;
101+
}
102102

103103
if (parentCY === baseLine) {
104104
var direction = 1;
@@ -958,14 +958,14 @@ define(['d3'], function () {
958958
throw new Error('Already up-to-date.');
959959
} else if (currentCommit.parent2 === mergeTarget.id) {
960960
throw new Error('Already up-to-date.');
961-
} else if (noFF === true) {
962-
var branchStartCommit = this.getCommit(mergeTarget.parent);
963-
while (branchStartCommit.parent !== currentCommit.id) {
964-
branchStartCommit = this.getCommit(branchStartCommit.parent);
965-
}
966-
967-
branchStartCommit.isNoFFBranch = true;
968-
961+
} else if (noFF === true) {
962+
var branchStartCommit = this.getCommit(mergeTarget.parent);
963+
while (branchStartCommit.parent !== currentCommit.id) {
964+
branchStartCommit = this.getCommit(branchStartCommit.parent);
965+
}
966+
967+
branchStartCommit.isNoFFBranch = true;
968+
969969
this.commit({parent2: mergeTarget.id, isNoFFCommit: true});
970970
} else if (this.isAncestor(currentCommit, mergeTarget)) {
971971
this.fastForward(mergeTarget);

0 commit comments

Comments
 (0)