Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: git-push: forced update of tag shows unabbreviated SHA1

From: Jeff King <hidden>
Date: 2016-06-15 22:44:09

On Thu, Jan 31, 2008 at 10:27:43AM +0100, Johannes Sixt wrote:
When a tag is changed to point to a new commit, then the tag is pushed to
a repo that still has the old tag, it is correctly pushed, but the old
SHA1 is reported with all 40 digits:
As Junio noted, this is because find_unique_abbrev returns NULL for
objects we don't have. Actually, it is somewhat worse -- we return an
erroneous abbreviation in the rare case that we are trying to find the
abbreviation for something we don't have, but for which we do have a
matching abbreviation. For example, if we have

  1234567890123456789012345678901234567890

then for every 12345678* that we don't have, we will claim the correct
abbreviation is 1234568.

In practice, I doubt this is a problem.

But getting back to your point: yes, I agree it is a little ugly.
Rewriting find_unique_abbrev would be necessary for fixing it, and I'm
not sure it is worth the trouble.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help