Repository: orhun/git-cliff
Pull request #1121: feat(git): disable sorting commits topologically (#804)
Author: login: SebClapie
Created: 2025-03-26T10:27:09Z | Merged: 2025-04-05T16:58:45Z

## Description

Add sorting option for commits 

## Motivation and Context

This change is related to #804 
When I tried git-cliff on my personal git repository, the commits order was not correct. 
I finally found why the order was not correct. The CHANGELOD generated got the same order than the command git log --oneline --topo-order.


## How Has This Been Tested?

I did not add a specific test for this feature, I apologize, I just installed rust for the first time yesterday and I never used GitHub before ..
I tried to follow your recommandation.
I launched:
- cargo build
- cargo test
- cargo fmt
- cargo clippy

I also tested on my side that the sort is functional on my repro. I tested the command line option --disable-topo-order-commits
I also tested this option inside my file cliff.toml

## Screenshots / Logs (if applicable)

## Types of Changes


- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation (no code change)
- [ ] Refactor (refactoring production code)
- [ ] Other <!--- (provide information) -->

## Checklist:

- [X] My code follows the code style of this project.
I launched cargo fmt and cargo clippy
- [X] I have updated the documentation accordingly.
Maybe the text can be improved
- [X] I have formatted the code with [rustfmt](https://github.com/rust-lang/rustfmt).
- [X] I checked the lints with [clippy](https://github.com/rust-lang/rust-clippy).
- [ ] I have added tests to cover my changes.
- [X] All new and existing tests passed.

<!--- Thank you for contributing to git-cliff! ⛰️  -->



Diff:
diff --git a/.github/fixtures/test-topo-order-commits/cliff.toml b/.github/fixtures/test-topo-order-commits/cliff.toml
new file mode 100644
index 0000000000..b8139b1430
--- /dev/null
+++ b/.github/fixtures/test-topo-order-commits/cliff.toml
@@ -0,0 +1,7 @@
+# git-cliff ~ configuration file
+# https://git-cliff.org/docs/configuration
+
+
+[git]
+
+topo_order_commits = false
\ No newline at end of file
diff --git a/.github/fixtures/test-topo-order-commits/commit.sh b/.github/fixtures/test-topo-order-commits/commit.sh
new file mode 100755
index 0000000000..f4b6c67b43
--- /dev/null
+++ b/.github/fixtures/test-topo-order-commits/commit.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -e
+
+GIT_COMMITTER_DATE="2022-04-06 03:25:08" git commit --allow-empty -m "Initial commit"
+GIT_COMMITTER_DATE="2022-04-06 03:25:09" git commit --allow-empty -m "feat: add feature 1"
+GIT_COMMITTER_DATE="2022-04-06 03:25:10" git commit --allow-empty -m "fix: fix feature 1"
+git tag v0.1.0
+GIT_COMMITTER_DATE="2022-04-06 03:25:11" git commit --allow-empty -m "feat(gui): add feature 2"
+GIT_COMMITTER_DATE="2022-04-06 03:25:12" git commit --allow-empty -m "fix(gui): fix feature 2"
+git tag v0.2.0
+GIT_COMMITTER_DATE="2022-04-06 03:25:25" git commit --allow-empty -m "test: add tests"
+GIT_COMMITTER_DATE="2022-04-06 03:25:25" git checkout v0.1.0
+GIT_COMMITTER_DATE="2022-04-06 03:25:13" git commit --allow-empty -m "fix: fix again feature 1"
+git tag v0.1.1
+git checkout master
+git merge v0.1.1 --no-edit
diff --git a/.github/fixtures/test-topo-order-commits/expected.md b/.github/fixtures/test-topo-order-commits/expected.md
new file mode 100644
index 0000000000..124385f103
--- /dev/null
+++ b/.github/fixtures/test-topo-order-commits/expected.md
@@ -0,0 +1,37 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+## [unreleased]
+
+### 🧪 Testing
+
+- Add tests
+
+## [0.1.1] - 2022-04-06
+
+### 🐛 Bug Fixes
+
+- Fix again feature 1
+
+## [0.2.0] - 2022-04-06
+
+### 🚀 Features
+
+- *(gui)* Add feature 2
+
+### 🐛 Bug Fixes
+
+- *(gui)* Fix feature 2
+
+## [0.1.0] - 2022-04-06
+
+### 🚀 Features
+
+- Add feature 1
+
+### 🐛 Bug Fixes
+
+- Fix feature 1
+
+<!-- generated by git-cliff -->
diff --git a/.github/workflows/test-fixtures.yml b/.github/workflows/test-fixtures.yml
index 567fba3143..6b33d948f6 100644
--- a/.github/workflows/test-fixtures.yml
+++ b/.github/workflows/test-fixtures.yml
@@ -110,6 +110,7 @@ jobs:
           - fixtures-name: test-require-conventional-skipped
           - fixtures-name: test-remote-config
             command: --config-url "https://github.com/orhun/git-cliff/blob/main/.github/fixtures/new-fixture-template/cliff.toml?raw=true"
+          - fixtures-name: test-topo-order-commits
 
     steps:
       - name: Checkout
diff --git a/config/cliff.toml b/config/cliff.toml
index b95f080102..f023a1ed93 100644
--- a/config/cliff.toml
+++ b/config/cliff.toml
@@ -94,6 +94,8 @@ link_parsers = []
 use_branch_tags = false
 # Order releases topologically instead of chronologically.
 topo_order = false
+# Order releases topologically instead of chronologically.
+topo_order_commits = true
 # Order of commits in each group/release within the changelog.
 # Allowed values: newest, oldest
 sort_commits = "oldest"
diff --git a/git-cliff-core/src/changelog.rs b/git-cliff-core/src/changelog.rs
index 6bfb90120c..d696e04919 100644
--- a/git-cliff-core/src/changelog.rs
+++ b/git-cliff-core/src/changelog.rs
@@ -862,6 +862,7 @@ mod test {
 				count_tags:               None,
 				use_branch_tags:          false,
 				topo_order:               false,
+				topo_order_commits:       true,
 				sort_commits:             String::from("oldest"),
 				link_parsers:             [].to_vec(),
 				limit_commits:            None,
diff --git a/git-cliff-core/src/config.rs b/git-cliff-core/src/config.rs
index 724e986e27..38d6a09b67 100644
--- a/git-cliff-core/src/config.rs
+++ b/git-cliff-core/src/config.rs
@@ -130,6 +130,8 @@ pub struct GitConfig {
 	pub use_branch_tags:          bool,
 	/// Order releases topologically instead of chronologically.
 	pub topo_order:               bool,
+	/// Order commits chronologically instead of topologically.
+	pub topo_order_commits:       bool,
 	/// How to order commits in each group/release within the changelog.
 	pub sort_commits:             String,
 	/// Limit the total number of commits included in the changelog.
diff --git a/git-cliff-core/src/repo.rs b/git-cliff-core/src/repo.rs
index 47e58884dc..21b534ee7a 100644
--- a/git-cliff-core/src/repo.rs
+++ b/git-cliff-core/src/repo.rs
@@ -118,9 +118,15 @@ impl Repository {
 		range: Option<&str>,
 		include_path: Option<Vec<Pattern>>,
 		exclude_path: Option<Vec<Pattern>>,
+		topo_order_commits: bool,
 	) -> Result<Vec<Commit>> {
 		let mut revwalk = self.inner.revwalk()?;
-		revwalk.set_sorting(Sort::TOPOLOGICAL)?;
+		if topo_order_commits {
+			revwalk.set_sorting(Sort::TOPOLOGICAL)?;
+		} else {
+			revwalk.set_sorting(Sort::TIME)?;
+		}
+
 		Self::set_commit_range(&mut revwalk, range).map_err(|e| {
 			Error::SetCommitRangeError(
 				range.map(String::from).unwrap_or_else(|| "?".to_string()),
@@ -621,7 +627,7 @@ mod test {
 	#[test]
 	fn get_latest_commit() -> Result<()> {
 		let repository = get_repository()?;
-		let commits = repository.commits(None, None, None)?;
+		let commits = repository.commits(None, None, None, false)?;
 		let last_commit =
 			AppCommit::from(&commits.first().expect("no commits found").clone());
 		assert_eq!(get_last_commit_hash()?, last_commit.id);
@@ -739,7 +745,7 @@ mod test {
 		let repository = get_repository()?;
 		// a close descendant of the root commit
 		let range = Some("eea3914c7ab07472841aa85c36d11bdb2589a234");
-		let commits = repository.commits(range, None, None)?;
+		let commits = repository.commits(range, None, None, false)?;
 		let root_commit =
 			AppCommit::from(&commits.last().expect("no commits found").clone());
 		assert_eq!(get_root_commit_hash()?, root_commit.id);
diff --git a/git-cliff-core/tests/integration_test.rs b/git-cliff-core/tests/integration_test.rs
index eb9dfeee35..fd04722b63 100644
--- a/git-cliff-core/tests/integration_test.rs
+++ b/git-cliff-core/tests/integration_test.rs
@@ -124,6 +124,7 @@ fn generate_changelog() -> Result<()> {
 		count_tags:               None,
 		use_branch_tags:          false,
 		topo_order:               false,
+		topo_order_commits:       true,
 		sort_commits:             String::from("oldest"),
 		link_parsers:             vec![
 			LinkParser {
diff --git a/git-cliff/src/lib.rs b/git-cliff/src/lib.rs
index ceff7d7ad2..a7bc0e67b9 100644
--- a/git-cliff/src/lib.rs
+++ b/git-cliff/src/lib.rs
@@ -173,7 +173,12 @@ fn process_repository<'a>(
 		}
 	} else if args.latest || args.current {
 		if tags.len() < 2 {
-			let commits = repository.commits(None, None, None)?;
+			let commits = repository.commits(
+				None,
+				None,
+				None,
+				config.git.topo_order_commits,
+			)?;
 			if let (Some(tag1), Some(tag2)) = (
 				commits.last().map(|c| c.id().to_string()),
 				tags.get_index(0).map(|(k, _)| k),
@@ -241,6 +246,7 @@ fn process_repository<'a>(
 		commit_range.as_deref(),
 		include_path,
 		args.exclude_path.clone(),
+		config.git.topo_order_commits,
 	)?;
 	if let Some(commit_limit_value) = config.git.limit_commits {
 		commits.truncate(commit_limit_value);
diff --git a/website/docs/configuration/git.md b/website/docs/configuration/git.md
index 1fa0317eec..69f311f472 100644
--- a/website/docs/configuration/git.md
+++ b/website/docs/configuration/git.md
@@ -24,6 +24,7 @@ tag_pattern = "v[0-9].*"
 skip_tags = "v0.1.0-beta.1"
 ignore_tags = ""
 topo_order = false
+topo_order_commits = true
 sort_commits = "oldest"
 link_parsers = [
     { pattern = "#(\\d+)", href = "https://github.com/orhun/git-cliff/issues/$1"},
@@ -252,6 +253,16 @@ If set to `true`, tags are processed in topological order instead of chronologic
 
 This can also be achieved by using the `--topo-order` command line flag.
 
+### topo_order_commits
+
+If set to `true`, commits are processed in topological order instead of chronological.
+
+```toml
+# if false, sorting commit is equivalent to git log 
+# if true (default), sorting commit is equivalent to git log --topo-order
+topo_order_commits = false
+```
+
 ### sort_commits
 
 Sort the commits inside sections by specified order.


Reviews:
user: login: orhun
body: Thanks for the PR! This is definitely one of the crucial missing pieces so I appreciate you taking time to implement it.

Some comments:

- I think the option should be called `topo_order_commits`. `disable_topo_order_commits` does not read well since we are using a boolean. (e.g. disable disable_topo_order_commits)
- We already have a `topo_order` option for sorting the tags. I think we should rename that to `topo_order_tags` and deprecate the old option. What do you think? (cc. @Cyclonit since he worked on revamping the config before)
- We should add fixture tests for this, see the instructions [here](https://github.com/orhun/git-cliff/tree/main/.github/fixtures#adding-new-fixtures).
state: COMMENTED
author_association: OWNER
submitted_at: 2025-03-27T09:43:51Z
user: login: Cyclonit
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-31T12:51:43Z
user: login: SebClapie
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-31T14:30:47Z
user: login: Cyclonit
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-31T20:30:30Z
user: login: orhun
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-01T06:09:36Z
user: login: orhun
body: LGTM, some minor comment issues :)

Can you also create a new issue for tracking the deprecation of `topo_order` (in favor of `topo_order_tags`)?
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-01T06:12:03Z
user: login: orhun
body: Some styling suggestions
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-02T20:17:52Z
user: login: orhun
body: Some minor things left :)

- The fixture config can be simplified.
- A small tweak in docs is needed (see my comment)
- We need an issue to track the deprecation of config
state: COMMENTED
author_association: OWNER
submitted_at: 2025-04-03T09:16:48Z
user: login: orhun
body: LGTM, thanks!

We'll probably talk about the deprecation of some options during the config revamp, which should be git-cliff v3 eventually.
state: APPROVED
author_association: OWNER
submitted_at: 2025-04-05T16:58:28Z

Review comments:
path: .github/fixtures/test-topo-order-commits/cliff.toml
user: login: Cyclonit
body: As of #1090 you don't have to include options if they match those in https://github.com/orhun/git-cliff/blob/main/config/cliff.toml (e.g. `changelog.header` and `changelog.footer`)
created_at: 2025-03-31T12:51:33Z
author_association: CONTRIBUTOR
path: .github/fixtures/test-topo-order-commits/cliff.toml
user: login: SebClapie
body: Ok, understood.
I just copied it from template and add my option to be tested.
created_at: 2025-03-31T14:30:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -94,6 +94,8 @@ link_parsers = []
 use_branch_tags = false
 # Order releases topologically instead of chronologically.
 topo_order = false
+# Topogical order for commits.
path: config/cliff.toml
user: login: Cyclonit
body: I'd change this comment to `Order releases topologically instead of chronologically." for it to match the one on `topo_order` and in https://github.com/orhun/git-cliff/pull/1121/files#diff-d6715128f2b8aa1fef49c9d3e4a98067df34d71aad00ba6350d7302bdbe72bf9R133.
created_at: 2025-03-31T20:30:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -94,6 +94,8 @@ link_parsers = []
 use_branch_tags = false
 # Order releases topologically instead of chronologically.
 topo_order = false
+# Topogical order for commits.
path: config/cliff.toml
user: login: orhun
body: Yup!

```suggestion
# Order releases topologically instead of chronologically.
```
created_at: 2025-04-01T06:09:36Z
author_association: OWNER
diff_hunk: @@ -252,6 +252,17 @@ If set to `true`, tags are processed in topological order instead of chronologic
 
 This can also be achieved by using the `--topo-order` command line flag.
 
+### topo_order_commits
+
+If set to `false`, commits are processed in chronological order instead of topological.
path: website/docs/configuration/git.md
user: login: orhun
body: We should use the same wording as `topo_order` above.

```suggestion
If set to `true`, commits are processed in topological order instead of chronological.
```
created_at: 2025-04-01T06:11:10Z
author_association: OWNER
diff_hunk: @@ -0,0 +1,44 @@
+# git-cliff ~ configuration file
+# https://git-cliff.org/docs/configuration
+
+[changelog]
+# A Tera template to be rendered as the changelog's header.
+# See https://keats.github.io/tera/docs/#introduction
+header = """
+# Changelog\n
+All notable changes to this project will be documented in this file.\n
+"""
+# A Tera template to be rendered for each release in the changelog.
+# See https://keats.github.io/tera/docs/#introduction
+body = """
+{% if version %}\
+    ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
+{% else %}\
+    ## [unreleased]
+{% endif %}\
+{% for group, commits in commits | group_by(attribute="group") %}
+    ### {{ group | upper_first }}
+    {% for commit in commits %}
+        - {{ commit.message | upper_first }}\
+    {% endfor %}
+{% endfor %}\n
+"""
+# A Tera template to be rendered as the changelog's footer.
+# See https://keats.github.io/tera/docs/#introduction
+footer = """
+<!-- generated by git-cliff -->
+"""
+# Remove leading and trailing whitespaces from the changelog's body.
+trim = true
+
+[git]
+# An array of regex based parsers for extracting data from the commit message.
+# Assigns commits to groups.
+# Optionally sets the commit's `scope` and can decide to exclude commits from further processing.
+commit_parsers = [
+    { message = "^feat", group = "Features", default_scope = "app" },
+    { message = "^fix", group = "Bug Fixes", scope = "cli" },
+	{ message = "^test", group = "Test"},
+]
path: .github/fixtures/test-topo-order-commits/cliff.toml
user: login: orhun
body: ```suggestion
    { message = "^fix", group = "Bug Fixes", scope = "cli" },
    { message = "^test", group = "Test"},
]
```
created_at: 2025-04-02T20:17:23Z
author_association: OWNER
diff_hunk: @@ -252,6 +252,17 @@ If set to `true`, tags are processed in topological order instead of chronologic
 
 This can also be achieved by using the `--topo-order` command line flag.
 
+### topo_order_commits
+
+If set to `true`, commits are processed in topological order instead of chronological.
+
+
+```toml
+# if false , sorting commit is equivalent to git log 
path: website/docs/configuration/git.md
user: login: orhun
body: ```suggestion

```toml
# if false, sorting commit is equivalent to git log 
```
created_at: 2025-04-02T20:17:41Z
author_association: OWNER
path: .github/fixtures/test-topo-order-commits/cliff.toml
user: login: orhun
body: We can now further simplify this config to remove the ones that are already in the default config.
created_at: 2025-04-03T09:15:07Z
author_association: OWNER
path: website/docs/configuration/git.md
user: login: orhun
body: Can you mention the new option at the top of this file? (line 26)
created_at: 2025-04-03T09:15:49Z
author_association: OWNER

PR comments:
user: login: welcome[bot]
created_at: 2025-03-26T10:27:12Z
body: Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️

author_association: NONE
user: login: codecov-commenter
created_at: 2025-03-26T11:11:38Z
body: ## [Codecov](https://app.codecov.io/gh/orhun/git-cliff/pull/1121?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) Report
Attention: Patch coverage is `22.22222%` with `7 lines` in your changes missing coverage. Please review.
> Project coverage is 41.48%. Comparing base [(`9e4bd07`)](https://app.codecov.io/gh/orhun/git-cliff/commit/9e4bd077b5a18922021afd8ffd671b7d7958ee5c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) to head [(`25b5c37`)](https://app.codecov.io/gh/orhun/git-cliff/commit/25b5c370b0ad449200692cd0bfc7b4dd01708c9f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z).

| [Files with missing lines](https://app.codecov.io/gh/orhun/git-cliff/pull/1121?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) | Patch % | Lines |
|---|---|---|
| [git-cliff/src/lib.rs](https://app.codecov.io/gh/orhun/git-cliff/pull/1121?src=pr&el=tree&filepath=git-cliff%2Fsrc%2Flib.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z#diff-Z2l0LWNsaWZmL3NyYy9saWIucnM=) | 0.00% | [6 Missing :warning: ](https://app.codecov.io/gh/orhun/git-cliff/pull/1121?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) |
| [git-cliff-core/src/repo.rs](https://app.codecov.io/gh/orhun/git-cliff/pull/1121?src=pr&el=tree&filepath=git-cliff-core%2Fsrc%2Frepo.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z#diff-Z2l0LWNsaWZmLWNvcmUvc3JjL3JlcG8ucnM=) | 66.67% | [1 Missing :warning: ](https://app.codecov.io/gh/orhun/git-cliff/pull/1121?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) |

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main    #1121      +/-   ##
==========================================
- Coverage   41.58%   41.48%   -0.10%     
==========================================
  Files          21       21              
  Lines        1816     1823       +7     
==========================================
+ Hits          755      756       +1     
- Misses       1061     1067       +6     
```

| [Flag](https://app.codecov.io/gh/orhun/git-cliff/pull/1121/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) | Coverage Δ | |
|---|---|---|
| [unit-tests](https://app.codecov.io/gh/orhun/git-cliff/pull/1121/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) | `41.48% <22.23%> (-0.10%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/orhun/git-cliff/pull/1121?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: Cyclonit
created_at: 2025-03-27T10:57:41Z
body: I would propose refactoring the system to have two options:

- `git.commit_order_by` = `topology`/`time`
- `changelog.release_order_by` = `topology`/`time`

Having enums instead of booleans improves readability significantly. But I know @orhun likes using as few words as possible ;)

However, we do not have any way of soft deprecating old config options and adding new ones beside it. That is something that would have to be designed.
author_association: CONTRIBUTOR
user: login: SebClapie
created_at: 2025-03-27T11:43:37Z
body: Hello,

Thanks @orhun for your feedback.
I will a look to the fixture, and I may come back to you if I need help

I can rename `disable_topo_order_commits `to `topo_order_commits`.
Or do I look for @Cyclonit proposal  ?

- `git.commit_order_by = topology/time`


author_association: CONTRIBUTOR
user: login: orhun
created_at: 2025-03-28T03:19:25Z
body: > I would propose refactoring the system to have two options:
> 
>     * `git.commit_order_by` = `topology`/`time`
> 
>     * `changelog.release_order_by` = `topology`/`time`

In that case we also need to deprecate the old options. I'd prefer we go with `topo_order_commits` for now and revamp the configuration later.

> However, we do not have any way of soft deprecating old config options and adding new ones beside it. That is something that would have to be designed.

We can probably add a warning while parsing the config 🤔 I'll look into it.

LMK @SebClapie when this is ready for review.


author_association: OWNER
user: login: SebClapie
created_at: 2025-03-31T06:45:19Z
body: Hello @orhun ,

I updated the code to rename the option `topo_order_commits `, and the default value is true to keep previous behavior
I added a new test fixture, but I don't know why I got this issue "line 2: ./commit.sh: Permission denied". I follow your procedure for add a new ficture, and it works locally for me.
author_association: CONTRIBUTOR
user: login: Cyclonit
created_at: 2025-03-31T12:40:52Z
body: > Hello @orhun ,
> 
> ... I added a new test fixture, but I don't know why I got this issue "line 2: ./commit.sh: Permission denied".

The `commit.sh` you created does not have POSIX permissions assigned to it. This usually happens because you created the file on windows. Run this to fix it, commit and push again:

```sh
git update-index --chmod=+x <file>
```
author_association: CONTRIBUTOR
user: login: SebClapie
created_at: 2025-03-31T14:37:59Z
body: The Typos action failed. But I don't think it's linked to my modification
I don't know how to retrigger it ....
author_association: CONTRIBUTOR
user: login: SebClapie
created_at: 2025-04-03T09:50:27Z
body: > Some minor things left :)
> 
> * The fixture config can be simplified.
> * A small tweak in docs is needed (see my comment)
> * We need an issue to track the deprecation of config

Hello @orhun 
what do you mean about the deprecation of config ?
You want to replace `topo_order` by `topo_order_tags `?
author_association: CONTRIBUTOR
user: login: Cyclonit
created_at: 2025-04-03T18:39:48Z
body: > > Some minor things left :)
> > 
> > * The fixture config can be simplified.
> > * A small tweak in docs is needed (see my comment)
> > * We need an issue to track the deprecation of config
> 
> Hello @orhun what do you mean about the deprecation of config ? You want to replace `topo_order` by `topo_order_tags `?

The current config schema has grown historically and is in need of a refactor. I attempted to do this back in #541, but couldn't keep up with other changes at the time. The goal of improving the config in general remains though.

One of the requirements for overhauling the config is the ability to soft deprecate old options. Otherwise any change to the config would be an immediate breaking change.

I don't think you need to care about that right now.
author_association: CONTRIBUTOR
user: login: welcome[bot]
created_at: 2025-04-05T16:58:47Z
body: Congrats on merging your first pull request! ⛰️

author_association: NONE