jaspernbrouwer / powerline-gitstatus

A Powerline segment for showing the status of a Git working copy
MIT License
384 stars 53 forks source link

Fix for show_tag=last #39

Open mryalamanchi opened 4 years ago

mryalamanchi commented 4 years ago

Using git describe --tags doesn't ultimately give the latest tag that was created. Therefore git rev-list --tags --max-count=1 was used to grab the hash of the latest tag and then supply the hash to git describe --tags HASH_VALUE

A quick dry-run on shell:

  1. Get to the root of any directory initialized with git.
  2. git describe --tags $(git rev-list --tags --max-count=1)