Skip to content

Commit

Permalink
fix(git): sort the commits in topological order
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Jul 18, 2021
1 parent 3e5c23d commit a1b4b5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-cliff-core/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Repository {
/// Sorts the commits by their time.
pub fn commits(&self, range: Option<String>) -> Result<Vec<Commit>> {
let mut revwalk = self.inner.revwalk()?;
revwalk.set_sorting(Sort::TIME)?;
revwalk.set_sorting(Sort::TIME | Sort::TOPOLOGICAL)?;
if let Some(range) = range {
revwalk.push_range(&range)?;
} else {
Expand Down

0 comments on commit a1b4b5b

Please sign in to comment.