We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 349873a commit d976937Copy full SHA for d976937
lib/mix/lib/mix/scm/git.ex
@@ -31,6 +31,7 @@ defmodule Mix.SCM.Git do
31
File.cd!(opts[:dest], fn ->
32
cond do
33
lock_repo != opts[:git] -> :outdated
34
+ lock_repo != get_origin -> :outdated
35
lock_opts != get_lock_opts(opts) -> :outdated
36
lock_rev != get_rev -> :mismatch
37
true -> :ok
@@ -136,6 +137,12 @@ defmodule Mix.SCM.Git do
136
137
nil
138
end
139
140
+ defp get_origin do
141
+ System.cmd('git config remote.origin.url')
142
+ |> :string.strip(:right, ?\n)
143
+ |> iolist_to_binary
144
+ end
145
+
146
defp run_cmd_or_raise(command) do
147
if Mix.shell.cmd(command) != 0 do
148
raise Mix.Error, message: "Command `#{command}` failed"
0 commit comments