@ghl-ai/aw 0.1.36-beta.80 → 0.1.36-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/push.mjs +4 -1
- package/package.json +1 -1
package/commands/push.mjs
CHANGED
|
@@ -382,7 +382,10 @@ async function doPush(files, awHome, dryRun, worktreeFlow = false, preStaged = f
|
|
|
382
382
|
if (worktreeFlow) {
|
|
383
383
|
finalBranch = await createPushBranch(awHome, generateBranchName(files), pathsToStage, commitMsg, preStaged);
|
|
384
384
|
} else {
|
|
385
|
-
if
|
|
385
|
+
// Only return to main if there are no unmerged commits ahead.
|
|
386
|
+
// If we're already on a push branch (previous PR not merged), create the
|
|
387
|
+
// new branch from current HEAD so it inherits all prior unmerged changes.
|
|
388
|
+
if (!preStaged && commitsAheadOfMain(awHome) === 0) {
|
|
386
389
|
try { checkoutMain(awHome); } catch (e) {
|
|
387
390
|
s.stop(chalk.red('Push failed'));
|
|
388
391
|
fmt.cancel(`Could not checkout main: ${e.message}`);
|