Skip to content

Commit

Permalink
feat(land): allow empty commits with fixupAll (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickm68 committed Mar 18, 2023
1 parent b704be2 commit 18d9717
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/landing_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ export default class LandingSession extends Session {
const commitInfo = { base, head, shas: commitShas };
this.saveCommitInfo(commitInfo);

const allowEmptyCommits = this.fixupAll ? ['--allow-empty'] : [];
try {
await forceRunAsync('git', ['cherry-pick', `${base}..${head}`], {
ignoreFailure: false
});
await forceRunAsync('git',
['cherry-pick', ...allowEmptyCommits, `${base}..${head}`],
{ ignoreFailure: false }
);
} catch (ex) {
cli.error('Failed to apply patches');
process.exit(1);
Expand Down

0 comments on commit 18d9717

Please sign in to comment.