If tags are missing for a plugin, up to now the abbreviated commit hash got used as version number. If that commit was on someone's private local branch, one had no clue what code was running.
We want to switch to a version number that includes tags where possible (with branches as fallback) and include the abbreviated commit hash and an offset.
That way, if the commit is publicly available, it's easy to find and the tag/branch specifier helps to find the branch it was built for.
If the commit is not publicly available, the tag/branch name typically allows some educated guess of what code is running. For example running a plugin with version stable-2.12-2-gabcde on a Gerrit 3.2 server indicates issues, while v3.2.6-2-gabcde would look better.
Relevant upstream commits are: