git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-push: forced update of tag shows unabbreviated SHA1

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jan 31, 2008, 09:27 UTC
Message-ID
<47A1948F.6080308@viscovery.net>
This is just a cosmetical flaw:

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:

# make upstream repo $ mkdir A && cd A $ git init $ echo a > a; git add a; git commit -m a

# clone, modify, push $ cd .. $ git clone A B $ cd B $ echo b > a; git commit -a -m b $ git push file://$PWD/../A

# tag old state in upstream $ cd ../A $ git tag -m T T HEAD~1

# tag new state in clone (same name) and force-push tag
$ cd ../B
$ git tag -m Tclone T
$ git push -f file://$PWD/../A refs/tags/*:refs/tags/*
Counting objects: 1, done.
Unpacking objects: 100% (1/1), done.
Writing objects: 100% (1/1), 160 bytes, done.
Total 1 (delta 0), reused 0 (delta 0)
To file:///home/jsixt/tmp/foo/B/../A
 + 639669ce44f84417f30842c622064827dda01461...475e55f T -> T (forced update)
Notice that the original SHA1 is not abbreviated.
-- Hannes
Next: Junio C Hamano
Message 1 of 9 in “git-push: forced update of tag shows unabbreviated SHA1”
  1. Johannes SixtJan 31, 2008
  2. Junio C HamanoJan 31, 2008
  3. Johannes SixtJan 31, 2008
  4. Jeff KingJan 31, 2008
  5. Junio C HamanoJan 31, 2008
  6. Jeff KingJan 31, 2008
  7. Jeff KingJan 31, 2008
  8. Junio C HamanoJan 31, 2008
  9. Jeff KingJan 31, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.