(repo, filePaths, fileContent, afterWriteFn)
| 274 | } |
| 275 | |
| 276 | function createAndCommitFiles(repo, filePaths, fileContent, afterWriteFn) { |
| 277 | filePaths = filePaths instanceof Array ? filePaths : [filePaths]; |
| 278 | var filePromises = filePaths.map(function(fileName) { |
| 279 | return RepoUtils.commitFileToRepo(repo, fileName, fileContent) |
| 280 | .then(function() { |
| 281 | //First, create a file, have the same file in both the repo and workdir. |
| 282 | return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); |
| 283 | }) |
| 284 | .then(function() { |
| 285 | return afterWriteFn(repo, fileName); |
| 286 | }); |
| 287 | }); |
| 288 | |
| 289 | return Promise.all(filePromises); |
| 290 | } |
| 291 | |
| 292 | if (process.platform == "linux" || process.platform == "darwin") { |
| 293 | it("can stage filemode changes for one file", function() { |
no test coverage detected
searching dependent graphs…