From 44a2a101b6a700e57a9c692bf54e92f528c0a9d5 Mon Sep 17 00:00:00 2001 From: Karel Heyse Date: Fri, 2 Mar 2018 10:15:47 +0100 Subject: [PATCH] fix #7: merging an ancestor --- js/historyview.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/historyview.js b/js/historyview.js index 683201e..0626fd1 100644 --- a/js/historyview.js +++ b/js/historyview.js @@ -960,9 +960,7 @@ define(['d3'], function () { throw new Error('Cannot find ref: ' + ref); } - if (currentCommit.id === mergeTarget.id) { - throw new Error('Already up-to-date.'); - } else if (currentCommit.parent2 === mergeTarget.id) { + if (this.isAncestor(mergeTarget, currentCommit)) { throw new Error('Already up-to-date.'); } else if (noFF === true) { var branchStartCommit = this.getCommit(mergeTarget.parent);