| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1c334c6 commit 62daba3
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -207,17 +207,18 @@ function performRebase( | |||
| 207 | 207 | /* In the case of FF merges and a beforeFinishFn, this will fail | |
| 208 | 208 | * when looking for 'rewritten' so we need to handle that case. | |
| 209 | 209 | */ | |
| 210 | - function readRebaseMetadataFile(fileName, determineExistance) { | ||
| 211 | - const fullPath = path.join(repository.path(), "rebase-merge", fileName); | ||
| 212 | - if (determineExistance && !fse.existsSync(fullPath)) { | ||
| 213 | - return Promise.resolve(null); | ||
| 214 | - } | ||
| 215 | - | ||
| 210 | + function readRebaseMetadataFile(fileName, continueOnError) { | ||
| 216 | 211 | return fse.readFile( | |
| 217 | - fullPath, | ||
| 212 | + path.join(repository.path(), "rebase-merge", fileName), | ||
| 218 | 213 | { encoding: "utf8" } | |
| 219 | 214 | ) | |
| 220 | - .then(fp.trim); | ||
| 215 | + .then(fp.trim) | ||
| 216 | + .catch(function(err) { | ||
| 217 | + if (continueOnError) { | ||
| 218 | + return null; | ||
| 219 | + } | ||
| 220 | + throw err; | ||
| 221 | + }); | ||
| 221 | 222 | } | |
| 222 | 223 | ||
| 223 | 224 | function calcHeadName(input) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments