From d4b7cc14f1a9b08daed6efeace2a29266185028b Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Thu, 28 Aug 2025 16:54:11 -0400 Subject: [PATCH 1/2] DownloadStrategyDetector: handle tangled.sh Git URLs We have one formula (`lsr`) that uses a tangled.sh URL but they don't support a .git extension, so it isn't detected as a Git URL by `DownloadStrategyDetector`. We can use `using: :git` with the `stable` URL but livecheck can't use the `Git` strategy for tangled.sh URLs because its `match` method depends on `DownloadStrategyDetector` detecting the URL as a `GitDownloadStrategy`. This adds support for tangled.sh URLs to `DownloadStrategyDetector` to address this issue. This will also allow us to remove/omit the `using: :git` argument from related URLs. --- Library/Homebrew/download_strategy.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index f0965698c8..5353ee2862 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1616,6 +1616,7 @@ class DownloadStrategyDetector when %r{^https?://.+\.git$}, %r{^git://}, %r{^https?://git\.sr\.ht/[^/]+/[^/]+$}, + %r{^https?://tangled\.sh/[^/]+/[^/]+$}, %r{^ssh://git} GitDownloadStrategy when %r{^https?://www\.apache\.org/dyn/closer\.cgi}, From 46d4af6031df2bcd3ce88bb840581041f4310ff9 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Mon, 1 Sep 2025 08:22:40 -0400 Subject: [PATCH 2/2] Temporarily skip audit_download_strategy for lsr This is a temporary workaround to allow us to merge support for tangled.sh Git URLs in `DownloadStrategyDetector`, as it makes the `using: :git` argument in the `lsr` formula redundant and causes brew CI to fail. We can't remove that argument from the formula until the brew change is merged, so this allows us to do so. This should be removed after the brew change is available in a release. Co-authored-by: Carlo Cabrera --- Library/Homebrew/resource_auditor.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/resource_auditor.rb b/Library/Homebrew/resource_auditor.rb index 05f078b152..b68a362047 100644 --- a/Library/Homebrew/resource_auditor.rb +++ b/Library/Homebrew/resource_auditor.rb @@ -85,6 +85,9 @@ module Homebrew end end + # TODO: Remove this exception for `lsr` after support for tangled.sh + # Git URLs is available in a brew release. + return if name == "lsr" return if url_strategy != DownloadStrategyDetector.detect("", using) problem "Redundant `using:` value in URL"