Commit adcfcfa
authored
fix(tsort): correct minimal cycle reporting and precise back-edge removal with iterative DFS (uutils#8786)
- Implement iterative DFS to prevent stack overflows (from PR uutils#8737)
- Fix minimal cycle reporting to show only actual cycle nodes
- Remove redundant back-edge from last cycle node to first
- Update test expectations for corrected cycle handling1 parent 477b37a commit adcfcfa
File tree
3 files changed
+4
-8
lines changed- src/uu/tsort/src
- tests/by-util
3 files changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
| 239 | + | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
254 | 253 | | |
255 | 254 | | |
256 | | - | |
257 | | - | |
258 | 255 | | |
259 | 256 | | |
260 | | - | |
261 | 257 | | |
262 | 258 | | |
263 | 259 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments