docs: renaming formula requires two commits#20316
docs: renaming formula requires two commits#20316abitrolly wants to merge 2 commits intoHomebrew:mainfrom
Conversation
|
That modified bottle block warning is very new so seems more likely a bug with that? Dropping the bottle block for renames is expected because we don't support renames on bottle level (so old bottles don't work). So renames can work in a single commit, as long as git is able to detect it as a rename. If you've made significant changes to the formula that makes git not think that, you probably want to have a dedicated |
|
The bottles are regenerated in a separate PR, right? Perhaps the PR bot could detect renames from the PR title and don't block the PR in case the bottle section was removed from rename. |
|
Technically it doesn't really block the PR, despite the red status. But I agree that we should probably just fix the |
|
Oh, actually, maybe it's not the bottle block check? See Homebrew/homebrew-core#230831. The bottle block check doesn't complain about the rename being done in a single commit, but the commit style check does complain about the fact that a single commit modifies two formulae. |
That's an example of subtantial enough changes that git isn't detecting that as a rename. Renames work fine: Homebrew/homebrew-core#196439. The increased size of our bottle block does confuse git more nowadays though. Though Homebrew/homebrew-core#231234 still is detected as a rename despite all that. You can see commit style passes fine: Homebrew/homebrew-core@7419276
No, they're pushed to the same PR during merge |
This should help avoid some of the issues that motivated Homebrew/brew#20316.
|
Ah, yes, I see. We can fix this for |
Let's try a smaller test that doesn't confuse `git` here given the discussion at Homebrew/brew#20316.
|
Now I need to check if the fix works to remove double commit advice. "remove bottles" instruction is still needed. |
|
Passing on this, the advice is not desirable. We should instead fix it so this is not required. |
Using
git mvto rename formula will break CI. Formula needs to be copied and old one removed in two separate commits.See Homebrew/homebrew-core#231234 (comment) for details.
brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?