Skip to content

Commit e0d6d0d

Browse files
authored
feat(land): allow empty commits with fixupAll (#681)
1 parent 1ad864e commit e0d6d0d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/landing_session.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,12 @@ export default class LandingSession extends Session {
116116
const commitInfo = { base, head, shas: commitShas };
117117
this.saveCommitInfo(commitInfo);
118118

119+
const allowEmptyCommits = this.fixupAll ? ['--allow-empty'] : [];
119120
try {
120-
await forceRunAsync('git', ['cherry-pick', `${base}..${head}`], {
121-
ignoreFailure: false
122-
});
121+
await forceRunAsync('git',
122+
['cherry-pick', ...allowEmptyCommits, `${base}..${head}`],
123+
{ ignoreFailure: false }
124+
);
123125
} catch (ex) {
124126
cli.error('Failed to apply patches');
125127
process.exit(1);

0 commit comments

Comments
 (0)