| @@ -11,10 +11,9 @@ use git_repository::{ · 10 unmodified lines |
| 11 | 11 | }; |
| 12 | 12 | |
| 13 | 13 | use crate::command::changelog_impl::commit; |
| 14 | | −use crate::command::changelog_impl::commit::History; |
| 15 | 14 | use crate::utils::{component_to_bytes, is_tag_name, is_tag_version, package_by_name, tag_prefix}; |
| 16 | 15 | |
| 17 | | −pub fn commit_history(repo: &git::Easy) -> anyhow::Result<Option<History>> { |
| 16 | +pub fn commit_history(repo: &git::Easy) -> anyhow::Result<Option<commit::History>> { |
| 18 | 17 | let start = Instant::now(); |
| 19 | 18 | let prev = repo.object_cache_size(64 * 1024)?; |
| 20 | 19 | let reference = match repo.head()?.peeled()?.kind { |
| @@ -32,7 +31,7 @@ pub fn commit_history(repo: &git::Easy) -> anyhow::Result<Option<History>> { · 11 unmodified lines |
| 32 | 31 | (commit.message.to_owned(), commit.tree()) |
| 33 | 32 | }; |
| 34 | 33 | |
| 35 | | − items.push(commit::HistoryItem { |
| 34 | + items.push(commit::history::Item { |
| 36 | 35 | id: commit_id.detach(), |
| 37 | 36 | _message: message, |
| 38 | 37 | tree_data: repo.find_object(tree_id)?.data.to_owned(), |
| @@ -47,7 +46,7 @@ pub fn commit_history(repo: &git::Easy) -> anyhow::Result<Option<History>> { · 8 unmodified lines |
| 47 | 46 | elapsed.as_secs_f32(), |
| 48 | 47 | items.len() as f32 / elapsed.as_secs_f32() |
| 49 | 48 | ); |
| 50 | | − Ok(Some(History { |
| 49 | + Ok(Some(commit::History { |
| 51 | 50 | head: reference.detach(), |
| 52 | 51 | items, |
| 53 | 52 | })) |
| @@ -57,8 +56,8 @@ pub fn commit_history(repo: &git::Easy) -> anyhow::Result<Option<History>> { · 3 unmodified lines |
| 57 | 56 | pub fn ref_segments<'h>( |
| 58 | 57 | crate_name: &str, |
| 59 | 58 | ctx: &crate::Context, |
| 60 | | − history: &'h History, |
| 61 | | −) -> anyhow::Result<Vec<commit::HistorySegment<'h>>> { |
| 59 | + history: &'h commit::History, |
| 60 | +) -> anyhow::Result<Vec<commit::history::Segment<'h>>> { |
| 62 | 61 | let meta = &ctx.meta; |
| 63 | 62 | let package = package_by_name(meta, crate_name)?; |
| 64 | 63 | let tag_prefix = tag_prefix(package, &ctx.repo); |
| @@ -100,7 +99,7 @@ pub fn ref_segments<'h>( · 35 unmodified lines |
| 100 | 99 | |
| 101 | 100 | let start = Instant::now(); |
| 102 | 101 | let mut segments = Vec::new(); |
| 103 | | − let mut segment = commit::HistorySegment { |
| 102 | + let mut segment = commit::history::Segment { |
| 104 | 103 | _head: history.head.to_owned(), |
| 105 | 104 | history: vec![], |
| 106 | 105 | }; |
| @@ -181,7 +180,7 @@ pub fn ref_segments<'h>( · 74 unmodified lines |
| 181 | 180 | }, |
| 182 | 181 | Some(next_ref) => segments.push(std::mem::replace( |
| 183 | 182 | &mut segment, |
| 184 | | − commit::HistorySegment { |
| 183 | + commit::history::Segment { |
| 185 | 184 | _head: next_ref, |
| 186 | 185 | history: vec![item], |
| 187 | 186 | }, |