Commit 9061d01
committed
Handle empty branch in
`convert` previously returned a misleading "Incomplete list" error
when called on an empty `node`, because the indices branch ran with
`minValue == math.MaxInt`. Short-circuit the all-empty case to
return an empty `sops.TreeBranch` instead, which is the natural
identity for `unflattenTreeBranch(sops.TreeBranch{})`.
Signed-off-by: Hidde Beydals <hidde@hhh.computer>convert
1 parent ae2fdad commit 9061d01
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
| |||
0 commit comments