| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,25 +17,19 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git")) | |||
| 17 | 17 | history.on("commit", function(commit) { | |
| 18 | 18 | return commit.getDiff() | |
| 19 | 19 | .then(function(diffList) { | |
| 20 | - var addCommit = diffList.reduce(function(prevVal, diff) { | ||
| 21 | - var result = | ||
| 22 | - prevVal || | ||
| 23 | - diff.patches().reduce(function(prevValDiff, patch) { | ||
| 24 | - | ||
| 25 | - var result = | ||
| 26 | - prevValDiff || | ||
| 27 | - !!~patch.oldFile().path().indexOf("descriptor.json") || | ||
| 28 | - !!~patch.newFile().path().indexOf("descriptor.json"); | ||
| 29 | - | ||
| 30 | - return result; | ||
| 31 | - }, false); | ||
| 32 | - | ||
| 33 | - return result; | ||
| 34 | - }, false); | ||
| 35 | - | ||
| 36 | - if (addCommit) { | ||
| 37 | - commits.push(commit); | ||
| 38 | - } | ||
| 20 | + diffList.map(function(diff) { | ||
| 21 | + diff.patches().then(function(patches) { | ||
| 22 | + patches.map(function(patch) { | ||
| 23 | + var result = | ||
| 24 | + !!~patch.oldFile().path().indexOf("descriptor.json") || | ||
| 25 | + !!~patch.newFile().path().indexOf("descriptor.json"); | ||
| 26 | + | ||
| 27 | + if(result && !~commits.indexOf(commit)) { | ||
| 28 | + commits.push(commit); | ||
| 29 | + } | ||
| 30 | + }); | ||
| 31 | + }); | ||
| 32 | + }); | ||
| 39 | 33 | }); | |
| 40 | 34 | }); | |
| 41 | 35 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments