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

Re: tags sorted by their depth, *committerdate, and taggerdate

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 7, 2020, 23:56 UTC
Message-ID
<20200507235659.GD7234@camp.crustytoothpaste.net>
In-Reply-To
<20200507194224.GB25306@coredump.intra.peff.net>
On 2020-05-07 at 19:42:24, Jeff King wrote:
Show 11 quoted lines
> On Wed, May 06, 2020 at 08:16:35PM +0200, clime wrote:
> > Is something like that possible?
> > Is something like that possible even with git 1.7.1?
> 
> You'd need v1.7.2 for --ancestry-path. You could just use "$ref..HEAD"
> without it, and instead do:
> 
>   git merge-base --is-ancestor $ref HEAD
> 
> to cover the case where they aren't reachable from HEAD. But of course
> that's an extra traversal per tag.

I believe git merge-base --is-ancestor is much newer than v1.7.1. I think you have to use the old style, which IIRC is this:

  test "$(git rev-parse "$ref")" = "$(git merge-base "$ref" HEAD)"

If you'd like a more modern version for CentOS 6, I think Software Collections has one with suitable support.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: clime
Message 4 of 4 in “tags sorted by their depth, *committerdate, and taggerdate”
  1. climeMay 6, 2020
  2. Jeff KingMay 7, 2020
  3. climeMay 7, 2020
  4. brian m. carlsonMay 7, 2020

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.