Skip to content

Commit fec05b6

Browse files
Add proper sorting to git ls-remote (#37)
* Add proper sorting to git ls-remote * Format * Remove unneeded pieces
1 parent 6fadfe2 commit fec05b6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/dep_updater.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ maybe_update_hex_dep(Vsn, Package, Opts) ->
8383
maybe_update_git_dep(Name, {git, Repo, {tag, Vsn}}, Dep, Opts) ->
8484
GitCmd =
8585
lists:flatten(
86-
io_lib:format("git -c 'versionsort.suffix=-' ls-remote --refs --tags ~p '*.*.*'",
87-
[Repo])),
86+
io_lib:format("git -c ls-remote --sort=v:refname --refs --tags ~p '*.*.*'", [Repo])),
8887
LatestVsn =
8988
case rebar_utils:sh(GitCmd, [return_on_error]) of
9089
{ok, ""} ->

0 commit comments

Comments
 (0)