Skip to content

Commit ac0665d

Browse files
committed
Refer to default branch in links with HEAD
Anywhere we can use `blob/master` we can use `blob/HEAD` instead. This will make life easier if we ever rename our default branch in future (once/if Git and GitHub provides the necessary tooling to do so).
1 parent 1f77027 commit ac0665d

32 files changed

+64
-64
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md) document?
1+
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md) document?
22
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?
33
- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
4-
- [ ] 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).
4+
- [ ] 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).
55
- [ ] Have you successfully run `brew style` with your changes locally?
66
- [ ] Have you successfully run `brew tests` with your changes locally?
77

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to Homebrew
22

3-
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).
3+
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).
44

55
### Report a bug
66

Library/.rubocop_cask.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
inherit_from: ./.rubocop_shared.yml
22

33
Cask/HomepageMatchesUrl:
4-
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'
4+
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'
55
Enabled: true
66
Exclude:
77
- '**/test/support/fixtures/cask/Casks/**/*.rb'
@@ -15,11 +15,11 @@ Cask/NoDslVersion:
1515
Enabled: true
1616

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

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

2525
Layout/HashAlignment:

Library/Homebrew/cask/audit.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def check_latest_with_auto_updates
219219
def check_hosting_with_appcast
220220
return if cask.appcast
221221

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

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

@@ -355,7 +355,7 @@ def core_formula_names
355355
end
356356

357357
def core_formula_url
358-
"#{core_tap.default_remote}/blob/master/Formula/#{cask.token}.rb"
358+
"#{core_tap.default_remote}/blob/HEAD/Formula/#{cask.token}.rb"
359359
end
360360

361361
def check_download

Library/Homebrew/cask/cmd/info.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def self.repo_info(cask)
9797
url = if cask.tap.custom_remote? && !cask.tap.remote.nil?
9898
cask.tap.remote
9999
else
100-
"#{cask.tap.default_remote}/blob/master/Casks/#{cask.token}.rb"
100+
"#{cask.tap.default_remote}/blob/HEAD/Casks/#{cask.token}.rb"
101101
end
102102

103103
"From: #{Formatter.url(url)}"

Library/Homebrew/cask/exceptions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def to_s
151151
File: #{path}
152152
To retry an incomplete download, remove the file above.
153153
If the issue persists, visit:
154-
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/master/doc/reporting_bugs/checksum_does_not_match_error.md")}
154+
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/reporting_bugs/checksum_does_not_match_error.md")}
155155
EOS
156156
end
157157
end

Library/Homebrew/cmd/info.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def print_json
140140

141141
def github_remote_path(remote, path)
142142
if remote =~ %r{^(?:https?://|git(?:@|://))github\.com[:/](.+)/(.+?)(?:\.git)?$}
143-
"https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/master/#{path}"
143+
"https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/HEAD/#{path}"
144144
else
145145
"#{remote}/#{path}"
146146
end

Library/Homebrew/extend/os/linux/hardware/cpu.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def family
2121
return :dunno unless intel?
2222

2323
# See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers
24-
# and https://github.com/llvm-mirror/llvm/blob/master/lib/Support/Host.cpp
24+
# and https://github.com/llvm-mirror/llvm/blob/HEAD/lib/Support/Host.cpp
2525
# and https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures#Roadmap
2626
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
2727
cpu_model = cpuinfo[/^model\s*: ([0-9]+)/, 1].to_i

Library/Homebrew/keg.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def to_s
8080
).map { |dir| HOMEBREW_PREFIX/dir }.sort.uniq.freeze
8181

8282
# Keep relatively in sync with
83-
# https://github.com/Homebrew/install/blob/master/install
83+
# https://github.com/Homebrew/install/blob/HEAD/install
8484
MUST_EXIST_DIRECTORIES = (MUST_EXIST_SUBDIRECTORIES + [
8585
HOMEBREW_CELLAR,
8686
].sort.uniq).freeze

Library/Homebrew/os/mac.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ def latest_sdk_version
4343
def latest_stable_version
4444
# TODO: bump version when new macOS is released and also update
4545
# references in docs/Installation.md and
46-
# https://github.com/Homebrew/install/blob/master/install
46+
# https://github.com/Homebrew/install/blob/HEAD/install
4747
Version.new "10.15"
4848
end
4949

5050
def outdated_release?
5151
# TODO: bump version when new macOS is released and also update
5252
# references in docs/Installation.md and
53-
# https://github.com/Homebrew/install/blob/master/install
53+
# https://github.com/Homebrew/install/blob/HEAD/install
5454
version < "10.13"
5555
end
5656

0 commit comments

Comments
 (0)