Expand description
commit history の walk。
git log --date-order と同じ規則で返す: parent はその子がすべて出力されるまで
出力せず (topology 制約)、その制約の下で committer date の新しいものから順に
選ぶ。committer date が単調な履歴では単純な date 順と一致するが、clock skew の
ある履歴や、ancestor を指す ref が別の tip と並ぶ場合は topology 制約が効く。
実装は git と同様に 2 段階を踏む。最初の取り出しで到達可能な commit を全て 辿って「未出力の子の数」を数え、以後は子を出し切った commit だけを date 順の heap から取り出す (Kahn の topological sort の date 優先版)。到達した parent が store に無い場合 (shallow な入力や bundle の prerequisite) は、そこを履歴の 境界として黙って打ち切る。
Structs§
- Walk
- Walked
Commit - walk が返す commit。body は所有権ごと返す (parse は
commit()で行う)。