We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5305eb commit 9c8d2fbCopy full SHA for 9c8d2fb
1 file changed
cmd/add.go
@@ -57,6 +57,12 @@ func runAdd(cfg *config.Config, args []string) error {
57
return nil
58
}
59
60
+ if s.IsFullyMerged() {
61
+ cfg.Warningf("All branches in this stack have been merged")
62
+ cfg.Printf("Consider creating a new stack with %s", cfg.ColorCyan("gh stack init"))
63
+ return nil
64
+ }
65
+
66
idx := s.IndexOf(currentBranch)
67
if idx >= 0 && idx < len(s.Branches)-1 {
68
cfg.Errorf("can only add branches on top of the stack; checkout the top branch %q first", s.Branches[len(s.Branches)-1].Branch)
0 commit comments