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

Re: [PATCH v2] object-name: fix reversed ordering with ":/<PATTERN>" revisions

From
Justin Tobler <jltobler@gmail.com>
Date
Dec 7, 2024, 02:05 UTC
Message-ID
<rgy5ghibgbsblrtzn4ujzv3ggx6m4cx4uba56l74dcuhqyikuq@y4ljecsqm5ox>
In-Reply-To
<4fc44fe4-cf34-4b6b-a073-8ad5b02fe663@app.fastmail.com>
On 24/12/06 03:33PM, Kristoffer Haugsbakk wrote:
Show 16 quoted lines
> On Fri, Dec 6, 2024, at 13:28, Patrick Steinhardt wrote:
> > Recently it was reported [1] that "look for the youngest reachable
> > commit with log message that match the given pattern" syntax (e.g.
> > ':/<PATTERN>' or 'HEAD^{/<PATTERN>}') started to return results in
> 
> But the regression is only for `:/`.  Not for `HEAD^{/}`.  I’m sorry
> that I wasn’t clear in my previous message[1] since I didn’t establish
> the context properly:
> 
>     I have indeed noticed that `HEAD^{/}` returns a sensible thing while
>     `:/` does something strange like finding the root commit.
> 
> What I had noticed myself for a little while was that `HEAD^{/}` on
> Git 2.47.0 did something that I wanted (and which is documented) while
> `:/` behaved (behaves) weirdly.  I just shrugged that off since the
> second syntax is more useful anyway (like Junio said).

I was a bit curious why the regression only affected the `:/` syntax but not `HEAD^{/}` as they both use `get_oid_oneline()`. The commit list that was getting reversed only ever contain the reference commits themselves and not the commits being traversed to find the matching commit (that part comes a bit later). This means it is not a problem when there is only a single reference being traversed as in the case of `HEAD^{/}`. So this fix looks good. :)

-Justin
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 12 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.