Skip to content

Commit

Permalink
Merge pull request #382 from derrickstolee/update-from-fork-version
Browse files Browse the repository at this point in the history
git-update-git-for-windows: strip 'v' from fork tag
  • Loading branch information
dscho authored Oct 7, 2021
2 parents 7977f90 + a7969ea commit 4676f28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-extra/git-update-git-for-windows
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ update_git_for_windows () {

releases_url=https://api.github.com/repos/$fork/releases
latest_tag_url=$releases_url/latest
latest_eval='latest=${latest_tag#*\"tag_name\": \"}; latest=${latest%%\"*}'
latest_eval='latest=${latest_tag#*\"tag_name\": \"v}; latest=${latest%%\"*}'
else
git_label="Git for Windows"
releases_url=https://api.github.com/repos/git-for-windows/git/releases
Expand All @@ -229,6 +229,9 @@ update_git_for_windows () {
esac

eval "$latest_eval"
# Be extra careful to remove a leading 'v' from the tag.
latest=${latest#v}

# Did we ask about this version already?
recently_seen="$(get_recently_seen)"
test -n "$quiet" && test "x$recently_seen" = "x$latest" && return
Expand Down

0 comments on commit 4676f28

Please sign in to comment.