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

Pinned references?

From
EÖErik Östlund <erik.ostlund@gmail.com>
Date
Jun 18, 2026, 18:37 UTC
Message-ID
<CANE2Nt_LP9odF9tVsy8di54eSH=QJxif2WQfHC+TQGGFeVcjvg@mail.gmail.com>

I'd like to be able to express a reference together with an expected object ID, for example with strawman syntax like:

refs/tags/v1.2.3?oid=a1b2c3d4

The intended semantics would be that both the reference and object ID must exist, and Git should fail if the reference does not resolve to the specified object ID.

Tags are nice because they convey human meaning. Object IDs are nice because they are immutable. As it is, I often have to choose between the two, or represent them separately in external tooling.

Is there existing terminology, prior discussion, or an accepted Git-native approach for this kind of "ref plus expected OID" invariant? I searched both the Git reference documentation and the mailing list archives, but couldn't find what I was looking for.

Thanks, Erik

Next: Patrick Steinhardt
Message 1 of 4 in “Pinned references?”
  1. Erik ÖstlundJun 18, 2026
  2. Patrick SteinhardtJun 19, 2026
  3. Junio C HamanoJun 19, 2026
  4. Jeff KingJun 21, 2026

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.