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

Re: Unexpected behavior with :/<text> references

From
William Chargin <wchargin@gmail.com>
Date
Jul 9, 2018, 05:13 UTC
Message-ID
<CAFW+GMAnkLYReotwRvbVt9iPqmuq_8WMc1sck4Jkj_fyafVm3w@mail.gmail.com>
In-Reply-To
<CAFW+GMBLeLyJjJPaEXkyQ5fJ=L4q4vQ=26wjZ+n07ZvSaTaCUg@mail.gmail.com>

After further investigation, it appears that ":/foo" indeed resolves to the commit with message "foobar" (in the above example) if the commits are not all created at the same time: e.g., by adding `sleep 1` between the commit commands, or exporting `GIT_AUTHOR_DATE`.

This leaves only the question of why :/<text> references don't resolve to commits reachable only from HEAD, and whether this is the best behavior.

Previous: William CharginNext: Jeff King
Message 2 of 4 in “Unexpected behavior with :/<text> references”
  1. William CharginJul 9, 2018
  2. William CharginJul 9, 2018
  3. Jeff KingJul 9, 2018
  4. William CharginJul 9, 2018

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.