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

Re: [PATCH] object-name: fix reversed ordering with magic pathspecs

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Dec 6, 2024, 12:25 UTC
Message-ID
<cfc7adaa-ccf3-4f27-807c-2eed70e56aa8@app.fastmail.com>
In-Reply-To
<xmqqcyi5vxbj.fsf@gitster.g>
On Fri, Dec 6, 2024, at 12:57, Junio C Hamano wrote:
> [snip]
>     Recently it was reported [*1*] that "look for the youngest
>     reachable commit with log message that match the given pattern"
>     syntax (e.g. :/myMessagePattern, or HEAD^{/myMessagePattern})

But these are slightly different since `:/` searches in all refs. They are only equivalent (i.e. with Patrick’s fix) when you have just made a commit (like in Patrick’s test).

And the longer syntax doesn’t seem to be affected by any regressions. In this repo:

    $ # wrong
    $ git log --format=reference -1 :/Merge
    3857284f7b8 (Merge refs/heads/master from ., 2005-08-24)
    $ # correct (looks correct)
    $ git log --format=reference -1 HEAD^{/Merge}
    4a611ee7ebd (Merge branch 'kn/ref-transaction-hook-with-reflog', 2024-11-27)
>     started to show older commit.
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 5 of 16 in “object-name: fix reversed ordering with magic pathspecs”
  1. object-name: fix reversed ordering with magic pathspecsPatrick Steinhardt, Dec 6, 2024
  2. Kristoffer HaugsbakkDec 6, 2024
  3. Junio C HamanoDec 6, 2024
  4. Patrick SteinhardtDec 6, 2024
  5. Kristoffer HaugsbakkDec 6, 2024
  6. Junio C HamanoDec 6, 2024
  7. Patrick SteinhardtDec 6, 2024
  8. object-name: fix reversed ordering with ":/<PATTERN>" revisionsPatrick Steinhardt, Dec 6, 2024
  9. Kristoffer HaugsbakkDec 6, 2024
  10. Patrick SteinhardtDec 6, 2024
  11. Junio C HamanoDec 6, 2024
  12. Justin ToblerDec 7, 2024
  13. object-name: fix reversed ordering with ":/<PATTERN>" revisionsPatrick Steinhardt, Dec 6, 2024
  14. Kristoffer HaugsbakkDec 7, 2024
  15. Junio C HamanoDec 7, 2024
  16. René ScharfeDec 9, 2024

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.