Coming back to the original topic, ...
If a tag describes a commit, we currently output not the tag's ref but
its embedded name. This means that when the tag is locally stored under
a different name, the output given cannot be used to access the tag in
any way. A warning is also emitted in this case, but the message is not
very enlightening:
None of the above is wrong per-se, but the reason why we chose to
use the real name of the tag in the tag object, while issuing a
warning, was so that people can correct the mistake of storing an
annotated tag A to a wrong refname Q. If "describe" gave a name
based on refname Q, there is no incentive to correct the situation
to use the right refname. The name that describes the commits
relative to the real name of the A is *not* usable by design, until
the refname is corrected (i.e. the tag is stored in the right
place).
So I am not 100% confident that the original patch is a good idea.