Commit 33062b7
Fix sortAsc crash when set contains commits not in the DAG
Summary:
During drag-and-drop rebase previews, the preview DAG may contain
optimistic commits (e.g. OPTIMISTIC_REBASE_SUCC: hashes) that are not
present in the cached defaultSortAscIndex. Previously this threw
"not in the dag" errors.
Instead of silently filtering out missing commits (which would lose them
from the sorted output), fall back to the full topological sortAsc on
the underlying commitDag when any hash in the set is missing from the
cached index. This preserves all commits in the output while avoiding
the crash.
Fixes #1229
Differential Revision: D99703453
fbshipit-source-id: 3ccfc17ffa1a88ced16c8b700d72ffcb70fb6fec1 parent 8d1fb9c commit 33062b7
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
277 | 282 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
0 commit comments