[go: up one dir, main page]

Skip to content

Commit

Permalink
improve performance of commit-graph variant ever-so-slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Aug 26, 2024
1 parent ded2e53 commit 0a4c5d6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gix-revision/src/merge_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,10 @@ pub(crate) mod function {
type Error = gix_object::decode::Error;

fn try_from(commit: LazyCommit<'_, '_>) -> Result<Self, Self::Error> {
let (generation, timestamp) = commit.generation_and_timestamp()?;
Ok(GenThenTime {
generation: commit
.generation()
.unwrap_or(gix_commitgraph::GENERATION_NUMBER_INFINITY),
time: commit.committer_timestamp()?,
generation: generation.unwrap_or(gix_commitgraph::GENERATION_NUMBER_INFINITY),
time: timestamp,
})
}
}
Expand Down

0 comments on commit 0a4c5d6

Please sign in to comment.