Skip to content

Commit

Permalink
Merge pull request #2 from dwango-js/fix-git2.9
Browse files Browse the repository at this point in the history
fix(bin): support Git 2.9
  • Loading branch information
azu authored Aug 11, 2016
2 parents f44733d + ba4e86b commit 4f46497
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bin/git-full-review.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function fail(message) {
exit(1);
}
if (!which('git')) {
fail('Sorry, this script requires git');
fail('Sorry, this script requires git command');
}
// create empty...review
var emptyBranchName = "empty";
Expand Down Expand Up @@ -34,9 +34,11 @@ exec("git clean -fxd");
exec('git commit --allow-empty -m "Start of the review"');
// create empty branch
exec('git branch ' + emptyBranchName);
// merge review point
// merge with prev branch(= probably master)
exec('git merge "' + currentBranchName + '"');
// merge review point
// merge with prev branch(= probably master)
// Git 2.9 require --allow-unrelated-histories
// http://stackoverflow.com/questions/27641380/git-merge-commits-into-an-orphan-branch/36528527#36528527
exec('git merge --allow-unrelated-histories "' + currentBranchName + '"');
// push to origin
exec("git push origin " + reviewBranchName);
exec("git push origin " + emptyBranchName);
Expand Down

0 comments on commit 4f46497

Please sign in to comment.