blob: 21376b9c5cf90aedb444ef41e035637f7206eef1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package bug
// OperationPack represent an ordered set of operation to apply
// to a Bug. These operations are stored in a single Git commit.
//
// These commits will be linked together in a linear chain of commits
// inside Git to form the complete ordered chain of operation to
// apply to get the final state of the Bug
type OperationPack struct {
Operations []Operation
}
// Append a new operation to the pack
func (opp *OperationPack) Append(op Operation) {
opp.Operations = append(opp.Operations, op)
}
func (opp *OperationPack) IsEmpty() bool {
return len(opp.Operations) == 0
}
func (opp *OperationPack) IsValid() bool {
return !opp.IsEmpty()
}
|