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

Re: Advanced revision selection?

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
May 27, 2016, 15:59 UTC
Message-ID
<vpq8tyvmqzz.fsf@anie.imag.fr>
In-Reply-To
<874m9j7bnv.fsf@thinkpad.rath.org>
Nikolaus Rath <Nikolaus@rath.org> writes:
> In Mercurial, this can be done with a more verbose syntax (e.g.
> "last(ancestors(tag("re:release-.*")),3) and descendants(aebeccf)" for
> the above example).

This has no direct equivalent in Git. A lot can be done passing options to "git rev-list" or so, for example, but I don't think a combination can be found for your exact example.

The closest I get is:
  git log `git for-each-ref refs/tags/release- --format '%(refname)'` -3
Which lists 3 commits preceeding a tag whose name starts with release-.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Nikolaus Rath
Message 2 of 2 in “Advanced revision selection?”
  1. Nikolaus RathMay 27, 2016
  2. Matthieu MoyMay 27, 2016

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.