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
aduh95 authored Mar 18, 2023
1 parent 1ad864e commit e0d6d0d
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 e0d6d0d

Please sign in to comment.