Skip to content

Commit

Permalink
do not suggest duplicate commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Abbe98 committed Jan 13, 2017
1 parent 0efd8cb commit 70f74c4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions modules/ui/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,18 @@ export function uiCommit(context) {
if (err) return;

var comments = [];
var addedComments = [];

for (var i = 0; i < changesets.length; i++) {
if (changesets[i].tags.comment) {
comments.push({
title: changesets[i].tags.comment,
value: changesets[i].tags.comment
});
if (addedComments.indexOf(changesets[i].tags.comment) === -1) {
comments.push({
title: changesets[i].tags.comment,
value: changesets[i].tags.comment
});

addedComments.push(changesets[i].tags.comment);
}
}
}

Expand Down

0 comments on commit 70f74c4

Please sign in to comment.