Skip to content

Commit

Permalink
Merge pull request #7826 from MikeMcQuaid/HEAD-default-branch
Browse files Browse the repository at this point in the history
Refer to default branch in links with HEAD
  • Loading branch information
MikeMcQuaid committed Jun 25, 2020
2 parents 1f77027 + ac0665d commit adbc50f
Show file tree
Hide file tree
Showing 32 changed files with 64 additions and 64 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,7 +1,7 @@
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md) document?
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md) document?
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?
- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/test/PATH_spec.rb).
- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/test/PATH_spec.rb).
- [ ] Have you successfully run `brew style` with your changes locally?
- [ ] Have you successfully run `brew tests` with your changes locally?

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
@@ -1,6 +1,6 @@
# Contributing to Homebrew

First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct) and review [How To Open a Homebrew Pull Request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request).
First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct) and review [How To Open a Homebrew Pull Request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request).

### Report a bug

Expand Down
6 changes: 3 additions & 3 deletions Library/.rubocop_cask.yml
@@ -1,7 +1,7 @@
inherit_from: ./.rubocop_shared.yml

Cask/HomepageMatchesUrl:
Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
Enabled: true
Exclude:
- '**/test/support/fixtures/cask/Casks/**/*.rb'
Expand All @@ -15,11 +15,11 @@ Cask/NoDslVersion:
Enabled: true

Cask/StanzaGrouping:
Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order'
Enabled: true

Cask/StanzaOrder:
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order'
Enabled: true

Layout/HashAlignment:
Expand Down
8 changes: 4 additions & 4 deletions Library/Homebrew/cask/audit.rb
Expand Up @@ -219,7 +219,7 @@ def check_latest_with_auto_updates
def check_hosting_with_appcast
return if cask.appcast

add_appcast = "please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/appcast.md"
add_appcast = "please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/appcast.md"

case cask.url.to_s
when %r{github.com/([^/]+)/([^/]+)/releases/download/(\S+)}
Expand All @@ -246,9 +246,9 @@ def check_url
def check_download_url_format
odebug "Auditing URL format"
if bad_sourceforge_url?
add_warning "SourceForge URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
add_warning "SourceForge URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
elsif bad_osdn_url?
add_warning "OSDN URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
add_warning "OSDN URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
end
end

Expand Down Expand Up @@ -355,7 +355,7 @@ def core_formula_names
end

def core_formula_url
"#{core_tap.default_remote}/blob/master/Formula/#{cask.token}.rb"
"#{core_tap.default_remote}/blob/HEAD/Formula/#{cask.token}.rb"
end

def check_download
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cmd/info.rb
Expand Up @@ -97,7 +97,7 @@ def self.repo_info(cask)
url = if cask.tap.custom_remote? && !cask.tap.remote.nil?
cask.tap.remote
else
"#{cask.tap.default_remote}/blob/master/Casks/#{cask.token}.rb"
"#{cask.tap.default_remote}/blob/HEAD/Casks/#{cask.token}.rb"
end

"From: #{Formatter.url(url)}"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/exceptions.rb
Expand Up @@ -151,7 +151,7 @@ def to_s
File: #{path}
To retry an incomplete download, remove the file above.
If the issue persists, visit:
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/master/doc/reporting_bugs/checksum_does_not_match_error.md")}
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/reporting_bugs/checksum_does_not_match_error.md")}
EOS
end
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/info.rb
Expand Up @@ -140,7 +140,7 @@ def print_json

def github_remote_path(remote, path)
if remote =~ %r{^(?:https?://|git(?:@|://))github\.com[:/](.+)/(.+?)(?:\.git)?$}
"https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/master/#{path}"
"https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/HEAD/#{path}"
else
"#{remote}/#{path}"
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/os/linux/hardware/cpu.rb
Expand Up @@ -21,7 +21,7 @@ def family
return :dunno unless intel?

# See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers
# and https://github.com/llvm-mirror/llvm/blob/master/lib/Support/Host.cpp
# and https://github.com/llvm-mirror/llvm/blob/HEAD/lib/Support/Host.cpp
# and https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures#Roadmap
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
cpu_model = cpuinfo[/^model\s*: ([0-9]+)/, 1].to_i
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/keg.rb
Expand Up @@ -80,7 +80,7 @@ def to_s
).map { |dir| HOMEBREW_PREFIX/dir }.sort.uniq.freeze

# Keep relatively in sync with
# https://github.com/Homebrew/install/blob/master/install
# https://github.com/Homebrew/install/blob/HEAD/install
MUST_EXIST_DIRECTORIES = (MUST_EXIST_SUBDIRECTORIES + [
HOMEBREW_CELLAR,
].sort.uniq).freeze
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/os/mac.rb
Expand Up @@ -43,14 +43,14 @@ def latest_sdk_version
def latest_stable_version
# TODO: bump version when new macOS is released and also update
# references in docs/Installation.md and
# https://github.com/Homebrew/install/blob/master/install
# https://github.com/Homebrew/install/blob/HEAD/install
Version.new "10.15"
end

def outdated_release?
# TODO: bump version when new macOS is released and also update
# references in docs/Installation.md and
# https://github.com/Homebrew/install/blob/master/install
# https://github.com/Homebrew/install/blob/HEAD/install
version < "10.13"
end

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/rubocops/cask/homepage_matches_url.rb
Expand Up @@ -14,7 +14,7 @@ class HomepageMatchesUrl < Cop # rubocop:disable Metrics/ClassLength
include CaskHelp

REFERENCE_URL =
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment"

COMMENT_FORMAT = /# [^ ]+ was verified as official when first introduced to the cask/.freeze
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/rubocops/cask/stanza_grouping.rb
Expand Up @@ -6,7 +6,7 @@ module RuboCop
module Cop
module Cask
# This cop checks that a cask's stanzas are grouped correctly.
# See https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
# See https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order
# for more info.
class StanzaGrouping < Cop
extend Forwardable
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/rubocops/cask/stanza_order.rb
Expand Up @@ -6,7 +6,7 @@ module RuboCop
module Cop
module Cask
# This cop checks that a cask's stanzas are ordered correctly.
# See https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
# See https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order
# for more info.
class StanzaOrder < Cop
extend Forwardable
Expand Down
16 changes: 8 additions & 8 deletions Library/Homebrew/test/cask/cmd/info_spec.rb
Expand Up @@ -15,7 +15,7 @@
local-caffeine: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-caffeine.rb
==> Name
None
==> Artifacts
Expand All @@ -30,7 +30,7 @@
with-auto-updates: 1.0 (auto_updates)
https://brew.sh/autoupdates
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-auto-updates.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-auto-updates.rb
==> Name
AutoUpdates
==> Artifacts
Expand All @@ -44,7 +44,7 @@
local-caffeine: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-caffeine.rb
==> Name
None
==> Artifacts
Expand All @@ -53,7 +53,7 @@
local-transmission: 2.61
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-transmission.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-transmission.rb
==> Name
Transmission
==> Artifacts
Expand All @@ -75,7 +75,7 @@
with-caveats: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-caveats.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-caveats.rb
==> Name
None
==> Artifacts
Expand All @@ -100,7 +100,7 @@
with-conditional-caveats: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-conditional-caveats.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-conditional-caveats.rb
==> Name
None
==> Artifacts
Expand All @@ -115,7 +115,7 @@
with-languages: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-languages.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-languages.rb
==> Name
None
==> Languages
Expand All @@ -132,7 +132,7 @@
without-languages: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/without-languages.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/without-languages.rb
==> Name
None
==> Artifacts
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/test/cmd/info_spec.rb
Expand Up @@ -24,13 +24,13 @@

specify "::github_remote_path" do
expect(subject.github_remote_path(remote, "Formula/git.rb"))
.to eq("https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb")
.to eq("https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb")

expect(subject.github_remote_path("#{remote}.git", "Formula/git.rb"))
.to eq("https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb")
.to eq("https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb")

expect(subject.github_remote_path("git@github.com:user/repo", "foo.rb"))
.to eq("https://github.com/user/repo/blob/master/foo.rb")
.to eq("https://github.com/user/repo/blob/HEAD/foo.rb")

expect(subject.github_remote_path("https://mywebsite.com", "foo/bar.rb"))
.to eq("https://mywebsite.com/foo/bar.rb")
Expand Down
Expand Up @@ -110,7 +110,7 @@
[{
message: "`# brew.sh was verified as official` does not " \
"match the expected comment format. For details, see " \
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment",
severity: :convention,
line: 2,
Expand Down Expand Up @@ -188,7 +188,7 @@
[{
message: "`brew.sh` does not match `example.org`, a comment " \
"has to be added above the `url` stanza. For details, see " \
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment",
severity: :convention,
line: 2,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -19,7 +19,7 @@ Second, read the [Troubleshooting Checklist](https://docs.brew.sh/Troubleshootin
**If you don't read these it will take us far longer to help you with your problem.**

## Contributing
We'd love you to contribute to Homebrew. First, please read our [Contribution Guide](CONTRIBUTING.md) and [Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct).
We'd love you to contribute to Homebrew. First, please read our [Contribution Guide](CONTRIBUTING.md) and [Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct).

We explicitly welcome contributions from people who have never contributed to open-source before: we were all beginners once! We can help build on a partially working pull request with the aim of getting it merged. We are also actively seeking to diversify our contributors and especially welcome contributions from women from all backgrounds and people of colour.

Expand Down
2 changes: 1 addition & 1 deletion docs/Analytics.md
Expand Up @@ -45,7 +45,7 @@ Homebrew's analytics are sent throughout Homebrew's execution to Google Analytic
Summaries of installation and error analytics are publicly available [here](https://brew.sh/analytics/). A JSON API is also available.

## How?
The code is viewable in [`analytics.rb`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/analytics.rb) and [`analytics.sh`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/analytics.sh). They are done in a separate background process and fail fast to avoid delaying any execution. They will fail immediately and silently if you have no network connection.
The code is viewable in [`analytics.rb`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/utils/analytics.rb) and [`analytics.sh`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/utils/analytics.sh). They are done in a separate background process and fail fast to avoid delaying any execution. They will fail immediately and silently if you have no network connection.

## Opting out
Homebrew analytics helps us maintainers and leaving it on is appreciated. However, if you want to opt out of Homebrew's analytics, you can set this variable in your environment:
Expand Down
6 changes: 3 additions & 3 deletions docs/External-Commands.md
Expand Up @@ -39,7 +39,7 @@ For example, see the [header of `brew-services.rb`](https://github.com/Homebrew/

### homebrew-livecheck
Check if there is a new upstream version of a formula.
See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/master/README.md) for more info and usage.
See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/HEAD/README.md) for more info and usage.

Install using:

Expand All @@ -49,7 +49,7 @@ brew tap homebrew/livecheck

### homebrew-command-not-found
Ubuntu's `command-not-found equivalent` for Homebrew.
See the [`README`](https://github.com/Homebrew/homebrew-command-not-found/blob/master/README.md) for more info and usage.
See the [`README`](https://github.com/Homebrew/homebrew-command-not-found/blob/HEAD/README.md) for more info and usage.

Install using:

Expand All @@ -59,7 +59,7 @@ brew tap homebrew/command-not-found

### homebrew-aliases
Allows you to alias your Homebrew commands.
See the [`README`](https://github.com/Homebrew/homebrew-aliases/blob/master/README.md) for more info and usage.
See the [`README`](https://github.com/Homebrew/homebrew-aliases/blob/HEAD/README.md) for more info and usage.

Install using:

Expand Down
2 changes: 1 addition & 1 deletion docs/FAQ.md
Expand Up @@ -74,7 +74,7 @@ the launchctl PATH for *all users*. For earlier versions of macOS, see
[this page](https://developer.apple.com/legacy/library/qa/qa1067/_index.html).

## How do I contribute to Homebrew?
Read our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md#contributing-to-homebrew).
Read our [contribution guidelines](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md#contributing-to-homebrew).

## Why do you compile everything?
Homebrew provides pre-compiled versions for many formulae. These
Expand Down

0 comments on commit adbc50f

Please sign in to comment.