File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,12 @@ defmodule Mix.SCM.Git do
79
79
location = opts [ :git ]
80
80
update_origin ( location )
81
81
82
- command = "git fetch --force --progress"
82
+ command = "git fetch --force"
83
+
84
+ if { 1 , 7 , 1 } <= git_version ( ) do
85
+ command = command <> " --progress"
86
+ end
87
+
83
88
if opts [ :tag ] do
84
89
command = command <> " --tags"
85
90
end
@@ -146,4 +151,20 @@ defmodule Mix.SCM.Git do
146
151
end
147
152
true
148
153
end
154
+
155
+ defp git_version do
156
+ case :application . get_env ( :mix , :git_version ) do
157
+ { :ok , version } ->
158
+ version
159
+ :undefined ->
160
+ "git version " <> version = String . strip System . cmd ( "git --version" )
161
+ version = String . split ( version , "." )
162
+ |> Enum . take ( 3 )
163
+ |> Enum . map ( & binary_to_integer ( & 1 ) )
164
+ |> list_to_tuple
165
+
166
+ :application . set_env ( :mix , :git_version , version )
167
+ version
168
+ end
169
+ end
149
170
end
You can’t perform that action at this time.
0 commit comments