From 10c9dfc2a4f2f73178d0b9a4d17288fda8fe5663 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Sat, 26 Jul 2025 07:04:00 +0300 Subject: [PATCH 1/2] docs: when renaming formula, old file needs to be copied See https://github.com/Homebrew/homebrew-core/pull/231234#issuecomment-3120242914 --- docs/Rename-A-Formula.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Rename-A-Formula.md b/docs/Rename-A-Formula.md index 4c7089565a11a..16fff1ad74b44 100644 --- a/docs/Rename-A-Formula.md +++ b/docs/Rename-A-Formula.md @@ -6,7 +6,7 @@ last_review_date: "1970-01-01" Sometimes software and formulae need to be renamed. To rename a formula you need to: -1. Rename the formula file and its class to a new formula name. The new name must meet all the usual rules of formula naming. Fix any test failures that may occur due to the stricter requirements for new formulae compared to existing formulae (e.g. `brew audit --strict` must pass for that formula). +1. Copy the formula file and rename its class to a new formula name. The new name must meet all the usual rules of formula naming. Fix any test failures that may occur due to the stricter requirements for new formulae compared to existing formulae (e.g. `brew audit --strict` must pass for that formula). 2. Create a pull request on the corresponding tap deleting the old formula file, adding the new formula file, and adding it to `formula_renames.json` with a commit message like `newack: renamed from ack`. Use the canonical name (e.g. `ack` instead of `user/repo/ack`). From 6f1a17b27a74a6806d153996f8f33aaea6d26f2d Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Sat, 26 Jul 2025 07:24:00 +0300 Subject: [PATCH 2/2] docs: rename should be done in two separate commits --- docs/Rename-A-Formula.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Rename-A-Formula.md b/docs/Rename-A-Formula.md index 16fff1ad74b44..7d68cbb7ef0f3 100644 --- a/docs/Rename-A-Formula.md +++ b/docs/Rename-A-Formula.md @@ -8,7 +8,7 @@ Sometimes software and formulae need to be renamed. To rename a formula you need 1. Copy the formula file and rename its class to a new formula name. The new name must meet all the usual rules of formula naming. Fix any test failures that may occur due to the stricter requirements for new formulae compared to existing formulae (e.g. `brew audit --strict` must pass for that formula). -2. Create a pull request on the corresponding tap deleting the old formula file, adding the new formula file, and adding it to `formula_renames.json` with a commit message like `newack: renamed from ack`. Use the canonical name (e.g. `ack` instead of `user/repo/ack`). +2. Create a pull request on the corresponding tap with at least two separate commits - one adding the new formula file, another deleting the old formula file. Also record the rename in `formula_renames.json` with a commit message like `newack: renamed from ack`. Use the canonical name (e.g. `ack` instead of `user/repo/ack`). A `formula_renames.json` example for a formula rename: