fix(tap): set clone remote name to origin explicitly
Git now allows setting a different default remote name than `origin` when you do a fresh clone by running: ```shell git config --global clone.defaultRemoteName notorigin ``` This causes `brew tap <tap_name> && brew update` to fail, as it clones with a different remote name in the `tap` and then expects the remote to be `origin` in the `update`. Fix this by explicitly setting the origin remote in the clone command.
This commit is contained in:
parent
c1bd17e1c9
commit
0f48498ad8
@ -296,6 +296,10 @@ class Tap
|
||||
|
||||
$stderr.ohai "Tapping #{name}" unless quiet
|
||||
args = %W[clone #{requested_remote} #{path}]
|
||||
|
||||
# Override possible user configs like:
|
||||
# git config --global clone.defaultRemoteName notorigin
|
||||
args << "--origin=origin"
|
||||
args << "--depth=1" unless full_clone
|
||||
args << "-q" if quiet
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user