| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -537,19 +537,19 @@ Repository.prototype.mergeBranches = function(to, from) { | |||
| 537 | 537 | var toBranch; | |
| 538 | 538 | ||
| 539 | 539 | return Promise.all([ | |
| 540 | - repo.getBranch(from), | ||
| 541 | - repo.getBranch(to) | ||
| 540 | + repo.getBranch(to), | ||
| 541 | + repo.getBranch(from) | ||
| 542 | 542 | ]).then(function(branches) { | |
| 543 | - fromBranch = branches[0]; | ||
| 544 | - toBranch = branches[1]; | ||
| 543 | + toBranch = branches[0]; | ||
| 544 | + fromBranch = branches[1]; | ||
| 545 | 545 | ||
| 546 | 546 | return Promise.all([ | |
| 547 | - repo.getBranchCommit(fromBranch), | ||
| 548 | - repo.getBranchCommit(toBranch) | ||
| 547 | + repo.getBranchCommit(toBranch), | ||
| 548 | + repo.getBranchCommit(fromBranch) | ||
| 549 | 549 | ]); | |
| 550 | 550 | }).then(function(branchCommits) { | |
| 551 | - var fromCommitOid = branchCommits[0].toString(); | ||
| 552 | - var toCommitOid = branchCommits[1].toString(); | ||
| 551 | + var toCommitOid = branchCommits[0].toString(); | ||
| 552 | + var fromCommitOid = branchCommits[1].toString(); | ||
| 553 | 553 | ||
| 554 | 554 | return NodeGit.Merge.base(repo, toCommitOid, fromCommitOid) | |
| 555 | 555 | .then(function(baseCommit) { | |
@@ -592,10 +592,11 @@ Repository.prototype.mergeBranches = function(to, from) { | |||
| 592 | 592 | fromBranch.shorthand() + | |
| 593 | 593 | " into " + | |
| 594 | 594 | toBranch.shorthand(); | |
| 595 | + console.log(message); | ||
| 595 | 596 | var sig = repo.defaultSignature(); | |
| 596 | 597 | ||
| 597 | 598 | return repo.createCommit( | |
| 598 | - toBranch.shorthand(), | ||
| 599 | + toBranch.name(), | ||
| 599 | 600 | sig, | |
| 600 | 601 | sig, | |
| 601 | 602 | message, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -225,7 +225,7 @@ describe("Merge", function() { | |||
| 225 | 225 | }); | |
| 226 | 226 | }); | |
| 227 | 227 | ||
| 228 | - it.only("can merge using the convenience method", function() { | ||
| 228 | + it.only("can merge cleanly using the convenience method", function() { | ||
| 229 | 229 | var initialFileName = "initialFile.txt"; | |
| 230 | 230 | var ourFileName = "ourNewFile.txt"; | |
| 231 | 231 | var theirFileName = "theirNewFile.txt"; | |
@@ -303,11 +303,11 @@ describe("Merge", function() { | |||
| 303 | 303 | "af60aa06b3537f75b427f6268a130c842c84a137"); | |
| 304 | 304 | ||
| 305 | 305 | return repository.createCommit(ourBranch.name(), ourSignature, | |
| 306 | - ourSignature, "we made a commit", oid, [initialCommit]); | ||
| 306 | + ourSignature, "we made a commit", oid, [initialCommit]); | ||
| 307 | 307 | }) | |
| 308 | 308 | .then(function(commitOid) { | |
| 309 | 309 | assert.equal(commitOid.toString(), | |
| 310 | - "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); | ||
| 310 | + "7ce31c05427659986d50abfb90c8f7db88ef4fa1"); | ||
| 311 | 311 | ||
| 312 | 312 | return repository.getCommit(commitOid).then(function(commit) { | |
| 313 | 313 | ourCommit = commit; | |
@@ -343,7 +343,7 @@ describe("Merge", function() { | |||
| 343 | 343 | }); | |
| 344 | 344 | }) | |
| 345 | 345 | .then(function() { | |
| 346 | - return repository.mergeBranches(theirBranchName, ourBranchName); | ||
| 346 | + return repository.mergeBranches(ourBranchName, theirBranchName); | ||
| 347 | 347 | }) | |
| 348 | 348 | .then(function(commitId) { | |
| 349 | 349 | assert.equal(commitId.toString(), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments