From 7896b80c42581b9d26a9af0e991f8b5049fbd5d4 Mon Sep 17 00:00:00 2001 From: daviddoji Date: Fri, 24 May 2024 14:44:43 +0200 Subject: [PATCH] Add change 29 to instructions --- how_to/Change_29.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 how_to/Change_29.md diff --git a/how_to/Change_29.md b/how_to/Change_29.md new file mode 100644 index 0000000..e2812d5 --- /dev/null +++ b/how_to/Change_29.md @@ -0,0 +1,9 @@ +- log: Use `iter_commits_and_parents` + +Refactoring ahead! Since we have `iter_commits_and_parents` from `k`, let's also +use this function in `log`. We'll need to adjust it a bit to use +`collections.deque` instead of a set so that the order of commits is deterministic. + +This generalization might seem unneeded at this point, but it will be useful +later. (Note for the advanced folks: When we implement merge commits that have +multiple parents, this generic way to iterate will come in handy.)