| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 57aeb86 commit 0a8be46
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -484,14 +484,14 @@ Repository.prototype.createCommitOnHead = function( | |||
| 484 | 484 | message, | |
| 485 | 485 | callback){ | |
| 486 | 486 | var repo = this; | |
| 487 | + var index; | ||
| 487 | 488 | ||
| 488 | - return repo.openIndex().then(function(index) { | ||
| 489 | - index.read(true); | ||
| 490 | - | ||
| 491 | - filesToAdd.forEach(function(filePath) { | ||
| 492 | - index.addByPath(filePath); | ||
| 493 | - }); | ||
| 494 | - | ||
| 489 | + return repo.openIndex().then(function(index_) { | ||
| 490 | + index = index_; | ||
| 491 | + index.read(1); | ||
| 492 | + return index.addAll(); | ||
| 493 | + }) | ||
| 494 | + .then(function() { | ||
| 495 | 495 | index.write(); | |
| 496 | 496 | ||
| 497 | 497 | return index.writeTree(); | |
@@ -643,8 +643,8 @@ Repository.prototype.fetchAll = function( | |||
| 643 | 643 | /** | |
| 644 | 644 | * Merge a branch onto another branch | |
| 645 | 645 | * | |
| 646 | - * @param {String|Ref} from | ||
| 647 | 646 | * @param {String|Ref} to | |
| 647 | + * @param {String|Ref} from | ||
| 648 | 648 | * @return {Oid|Index} A commit id for a succesful merge or an index for a | |
| 649 | 649 | * merge with conflicts | |
| 650 | 650 | */ | |
@@ -807,8 +807,8 @@ Repository.prototype.checkoutBranch = function(branch, opts) { | |||
| 807 | 807 | ||
| 808 | 808 | var name = ref.name(); | |
| 809 | 809 | ||
| 810 | - return repo.setHead(name, | ||
| 811 | - repo.defaultSignature(), | ||
| 810 | + return repo.setHead(name, | ||
| 811 | + repo.defaultSignature(), | ||
| 812 | 812 | "Switch HEAD to " + name); | |
| 813 | 813 | }) | |
| 814 | 814 | .then(function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments