···10631063 return nil
10641064}
1065106510661066+// all pulls above this pull (including self) in this stack
10671067+func (stack Stack) Above(pull *Pull) Stack {
10681068+ position := stack.Position(pull)
10691069+10701070+ if position < 0 {
10711071+ return nil
10721072+ }
10731073+10741074+ return stack[:position+1]
10751075+}
10761076+10771077+// all pulls below this pull (excluding self) in this stack
10781078+func (stack Stack) StrictlyAbove(pull *Pull) Stack {
10791079+ above := stack.Above(pull)
10801080+10811081+ if len(above) > 0 {
10821082+ return above[:len(above)-1]
10831083+ }
10841084+10851085+ return nil
10861086+}
10871087+10661088// the combined format-patches of all the newest submissions in this stack
10671089func (stack Stack) CombinedPatch() string {
10681090 // go in reverse order because the bottom of the stack is the last element in the slice