|
45 | 45 | }
|
46 | 46 | }
|
47 | 47 |
|
48 |
| - /// Add commits to start reading from. |
49 |
| - /// |
50 |
| - /// The behavior is similar to specifying additional `ends` in `git rev-list --topo-order ^ends tips`. |
51 |
| - pub fn with_tips(mut self, tips: impl IntoIterator<Item = impl Into<ObjectId>>) -> Self { |
52 |
| - self.tips.extend(tips.into_iter().map(Into::into)); |
53 |
| - self |
54 |
| - } |
55 |
| - |
56 |
| - /// Add commits ending the traversal. |
57 |
| - /// |
58 |
| - /// These commits themselves will not be read, i.e. the behavior is similar to specifying additional |
59 |
| - /// `ends` in `git rev-list --topo-order ^ends tips`. |
60 |
| - pub fn with_ends(mut self, ends: impl IntoIterator<Item = impl Into<ObjectId>>) -> Self { |
61 |
| - self.ends.extend(ends.into_iter().map(Into::into)); |
62 |
| - self |
63 |
| - } |
64 |
| - |
65 | 48 | /// Set a `predicate` to filter out revisions from the walk. Can be used to
|
66 | 49 | /// implement e.g. filtering on paths or time. This does *not* exclude the
|
67 | 50 | /// parent(s) of a revision that is excluded. Specify a revision as an 'end'
|
|
87 | 70 | Find: gix_object::Find,
|
88 | 71 | Predicate: FnMut(&oid) -> bool,
|
89 | 72 | {
|
| 73 | + /// Add commits to start reading from. |
| 74 | + /// |
| 75 | + /// The behavior is similar to specifying additional `ends` in `git rev-list --topo-order ^ends tips`. |
| 76 | + pub fn with_tips(mut self, tips: impl IntoIterator<Item = impl Into<ObjectId>>) -> Self { |
| 77 | + self.tips.extend(tips.into_iter().map(Into::into)); |
| 78 | + self |
| 79 | + } |
| 80 | + |
| 81 | + /// Add commits ending the traversal. |
| 82 | + /// |
| 83 | + /// These commits themselves will not be read, i.e. the behavior is similar to specifying additional |
| 84 | + /// `ends` in `git rev-list --topo-order ^ends tips`. |
| 85 | + pub fn with_ends(mut self, ends: impl IntoIterator<Item = impl Into<ObjectId>>) -> Self { |
| 86 | + self.ends.extend(ends.into_iter().map(Into::into)); |
| 87 | + self |
| 88 | + } |
| 89 | + |
90 | 90 | /// Set the `sorting` to use for the topological walk.
|
91 | 91 | pub fn sorting(mut self, sorting: Sorting) -> Self {
|
92 | 92 | self.sorting = sorting;
|
|
0 commit comments