Fix first push for new worktrees

This commit is contained in:
Mohamed Boudra
2026-06-10 11:54:36 +07:00
parent 51d1d007ce
commit 27b6242128
3 changed files with 47 additions and 13 deletions
+19
View File
@@ -166,6 +166,25 @@ describe("git-actions-policy", () => {
});
});
it("keeps push available for a no-upstream Paseo worktree with local commits", () => {
const actions = buildGitActions(
createInput({
hasRemote: true,
isPaseoOwnedWorktree: true,
isOnBaseBranch: false,
aheadCount: 1,
aheadOfOrigin: null,
behindOfOrigin: null,
}),
);
const pushAction = actions.secondary.find((action) => action.id === "push");
expect(pushAction).toMatchObject({
disabled: false,
unavailableMessage: undefined,
});
});
it("shows update-from-base only on feature branches that are behind the base branch", () => {
const actions = buildGitActions(
createInput({