From 043fa75b1fa4a43f18d37feff4bd51b28456c57d Mon Sep 17 00:00:00 2001 From: Duarte Areias dos Reis Date: Wed, 16 Apr 2025 10:02:31 +0100 Subject: [PATCH 1/3] Docs: Clarify use of CC2 The documentations surrounding CC2: contrib-disallow-cleanup-commits is not very explicit regarding the fact that the rule won't work without disabling gitlint default behavior of ignoring cleanup commits. This patch updates the docs with a note, explaining just that. Signed-off-by: Duarte Areias dos Reis --- docs/rules/contrib_rules.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/rules/contrib_rules.md b/docs/rules/contrib_rules.md index cf622b37..a91ca0da 100644 --- a/docs/rules/contrib_rules.md +++ b/docs/rules/contrib_rules.md @@ -74,6 +74,7 @@ Commit body must contain a line that starts with `Signed-off-by`. [:octicons-tag-24: v0.18.0][v0.18.0] · **ID**: CC2 · **Name**: contrib-disallow-cleanup-commits Commit title must not contain `fixup!`, `squash!` or `amend!`. This means `git commit --fixup` and `git commit --squash` commits are not allowed. +> **_NOTE:_** gitlint ignores merge, fixup, squash and revert commits by default. To enable this rule you must disable this behavior, as outlined [here](ignoring-commits#merge-fixup-squash-and-revert-commits). ### CC3: contrib-allowed-authors [:octicons-tag-24: v0.18.0][v0.18.0] · **ID**: CC3 · **Name**: contrib-allowed-authors From 48bb337dfc7beb00de777c01faecc419b910cb17 Mon Sep 17 00:00:00 2001 From: Duarte Areias dos Reis Date: Wed, 16 Apr 2025 11:00:16 +0100 Subject: [PATCH 2/3] fixup! Docs: Clarify use of CC2 --- docs/rules/contrib_rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rules/contrib_rules.md b/docs/rules/contrib_rules.md index a91ca0da..733ced7f 100644 --- a/docs/rules/contrib_rules.md +++ b/docs/rules/contrib_rules.md @@ -74,7 +74,7 @@ Commit body must contain a line that starts with `Signed-off-by`. [:octicons-tag-24: v0.18.0][v0.18.0] · **ID**: CC2 · **Name**: contrib-disallow-cleanup-commits Commit title must not contain `fixup!`, `squash!` or `amend!`. This means `git commit --fixup` and `git commit --squash` commits are not allowed. -> **_NOTE:_** gitlint ignores merge, fixup, squash and revert commits by default. To enable this rule you must disable this behavior, as outlined [here](ignoring-commits#merge-fixup-squash-and-revert-commits). +> **_NOTE:_** gitlint ignores merge, fixup, squash and revert commits by default. To enable this rule you must disable this behavior, as outlined [here](,,/ignoring-commits.md#merge-fixup-squash-and-revert-commits). ### CC3: contrib-allowed-authors [:octicons-tag-24: v0.18.0][v0.18.0] · **ID**: CC3 · **Name**: contrib-allowed-authors From f41be785c0c2b6e7975863a2cd3f10985e696020 Mon Sep 17 00:00:00 2001 From: Duarte Areias dos Reis Date: Wed, 16 Apr 2025 11:03:47 +0100 Subject: [PATCH 3/3] fixup! fixup! Docs: Clarify use of CC2 --- docs/rules/contrib_rules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rules/contrib_rules.md b/docs/rules/contrib_rules.md index 733ced7f..bd5f323d 100644 --- a/docs/rules/contrib_rules.md +++ b/docs/rules/contrib_rules.md @@ -74,7 +74,7 @@ Commit body must contain a line that starts with `Signed-off-by`. [:octicons-tag-24: v0.18.0][v0.18.0] · **ID**: CC2 · **Name**: contrib-disallow-cleanup-commits Commit title must not contain `fixup!`, `squash!` or `amend!`. This means `git commit --fixup` and `git commit --squash` commits are not allowed. -> **_NOTE:_** gitlint ignores merge, fixup, squash and revert commits by default. To enable this rule you must disable this behavior, as outlined [here](,,/ignoring-commits.md#merge-fixup-squash-and-revert-commits). +> **_NOTE:_** gitlint ignores merge, fixup, squash and revert commits by default. To enable this rule you must disable this behavior, as outlined [here](../ignoring-commits.md#merge-fixup-squash-and-revert-commits). ### CC3: contrib-allowed-authors [:octicons-tag-24: v0.18.0][v0.18.0] · **ID**: CC3 · **Name**: contrib-allowed-authors