| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d9f49f8 commit 6c049ab
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -173,7 +173,7 @@ Commit.prototype.getDiff = function(callback) { | |||
| 173 | 173 | var diffs = parents.map(function(parent) { | |
| 174 | 174 | return parent.getTree().then(function(parentTree) { | |
| 175 | 175 | return commit.getTree().then(function(thisTree) { | |
| 176 | - return parentTree.diff(thisTree); | ||
| 176 | + return thisTree.diff(parentTree); | ||
| 177 | 177 | }); | |
| 178 | 178 | }); | |
| 179 | 179 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,18 +59,18 @@ describe("Diff", function() { | |||
| 59 | 59 | assert.equal(lines[1].origin(), Diff.LINE.CONTEXT); | |
| 60 | 60 | assert.equal(lines[2].origin(), Diff.LINE.CONTEXT); | |
| 61 | 61 | ||
| 62 | - var oldContent = "\n__Before submitting a pull request, please ensure " + | ||
| 62 | + var oldContent = "__Before submitting a pull request, please ensure " + | ||
| 63 | 63 | "both unit tests and lint checks pass.__\n"; | |
| 64 | - assert.equal(lines[2].content(), oldContent); | ||
| 64 | + assert.equal(lines[3].content(), oldContent); | ||
| 65 | 65 | assert.equal(lines[3].origin(), Diff.LINE.DELETION); | |
| 66 | - assert.equal(lines[4].contentLen(), 90); | ||
| 66 | + assert.equal(lines[3].contentLen(), 90); | ||
| 67 | 67 | ||
| 68 | 68 | var newContent = "__Before submitting a pull request, please ensure " + | |
| 69 | 69 | "both that you've added unit tests to cover your shiny new code, " + | |
| 70 | 70 | "and that all unit tests and lint checks pass.__\n"; | |
| 71 | - assert.equal(lines[3].content(), newContent); | ||
| 71 | + assert.equal(lines[4].content(), newContent); | ||
| 72 | 72 | assert.equal(lines[4].origin(), Diff.LINE.ADDITION); | |
| 73 | - assert.equal(lines[3].contentLen(), 162); | ||
| 73 | + assert.equal(lines[4].contentLen(), 162); | ||
| 74 | 74 | }); | |
| 75 | 75 | ||
| 76 | 76 | it("can diff the workdir with index", function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments