Skip to content

Commit

Permalink
Fixed issue cherry picking one commit
Browse files Browse the repository at this point in the history
  • Loading branch information
divineniiquaye committed Feb 21, 2024
1 parent 8313ea0 commit 4ee3542
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/monorepo/src/Worker/SplitCommitsWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace Biurad\Monorepo\Worker;

use Biurad\Git\Commit;
use Biurad\Git\Repository;
use Biurad\Monorepo\{Monorepo, WorkerInterface, WorkflowCommand};
use Symfony\Component\Console\Input\{InputInterface, InputOption};
Expand Down Expand Up @@ -132,7 +133,7 @@ static function (array $required) use ($input, $output, $currentBranch, $branche
['checkout', '--orphan', "split-$remote"],
['reset', '--hard'],
['pull', $remote, $branch],
['cherry-pick', ...\explode(' ', "$target~".\implode(" $target~", \array_reverse(\range(0, $count - 1))))],
['check-pick', ...array_map(fn (Commit $c) => $c->getShortHash(), $mainRepo->getLog($target, null, $count)->getCommits())],
['push', $input->getOption('force') ? '-f' : '-q', $remote, "+refs/heads/split-$remote:$branch"],
['checkout', $currentBranch],
['branch', '-D', "split-$remote"],
Expand Down

0 comments on commit 4ee3542

Please sign in to comment.