Skip to content

Commit a6f048b

Browse files
author
José Valim
committed
Merge pull request #2104 from rcillo/rd-remove-git-force-https-option
Remove support to MIX_GIT_FORCE_HTTPS environment option
2 parents d161986 + aa87d44 commit a6f048b

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

lib/mix/lib/mix/scm/git.ex

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ defmodule Mix.SCM.Git do
6666

6767
def checkout(opts) do
6868
path = opts[:dest]
69-
location = location(opts[:git])
69+
location = opts[:git]
7070
command = ~s(git clone --no-checkout --progress "#{location}" "#{path}")
7171

7272
run_cmd_or_raise(command)
@@ -76,7 +76,7 @@ defmodule Mix.SCM.Git do
7676
def update(opts) do
7777
File.cd! opts[:dest], fn ->
7878
# Ensures origin is set the lock repo
79-
location = location(opts[:git])
79+
location = opts[:git]
8080
update_origin(location)
8181

8282
command = "git fetch --force --progress"
@@ -91,16 +91,6 @@ defmodule Mix.SCM.Git do
9191

9292
## Helpers
9393

94-
defp location("git://github.com/" <> rest) do
95-
if System.get_env("MIX_GIT_FORCE_HTTPS") == "1" do
96-
"https://github.com/" <> rest
97-
else
98-
"git://github.com/" <> rest
99-
end
100-
end
101-
102-
defp location(other), do: other
103-
10494
defp do_checkout(opts) do
10595
ref = get_lock_rev(opts[:lock]) || get_opts_rev(opts)
10696
run_cmd_or_raise "git checkout --quiet #{ref}"

0 commit comments

Comments
 (0)