Skip to content

Commit

Permalink
feat: allow stack prev to move to the trunk of the stack
Browse files Browse the repository at this point in the history
  • Loading branch information
Brookke committed Jun 7, 2024
1 parent b91a233 commit 951527d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/av/stack_prev.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ var stackPrevCmd = &cobra.Command{
return nil
}
branchToCheckout = previousBranches[0]
} else if len(args) == 0 && len(previousBranches) == 0 {
branchToCheckout, _ = meta.Trunk(tx, currentBranch)
} else {
if len(previousBranches) == 0 {
return errors.New("there is no previous branch")
return errors.New("there is no previous branches in the stack")
}
var n int = 1
if len(args) == 1 {
Expand Down

0 comments on commit 951527d

Please sign in to comment.