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

git tag --contains now takes a long time

From
JSJerry Snitselaar <jsnitsel@redhat.com>
Date
Oct 16, 2015, 22:07 UTC
Message-ID
<20151016220739.GF17700@cantor.redhat.com>

Is this known and being looked into? I've seen a jump from 12 seconds to over 9 minutes with running git tag --contains on my kernel repo.

snits ~/dev/linux> git --version git version 2.6.1.145.gb27dacc

snits ~/dev/linux> time git tag --contains 825fcfc next-20151012 next-20151013 v4.3-rc5

real 9m4.765s user 8m56.157s sys 0m2.450s

snits ~/dev/linux> git --version git version 2.5.0.275.gac4cc86

snits ~/dev/linux> time git tag --contains 825fcfc next-20151012 next-20151013 v4.3-rc5

real 0m12.842s user 0m11.536s sys 0m1.098s

b7cc53e92c806b73e14b03f60c17b7c29e52b4a4 is the first bad commit
commit b7cc53e92c806b73e14b03f60c17b7c29e52b4a4
Author: Karthik Nayak <karthik.188@gmail.com>
Date:   Fri Sep 11 20:36:16 2015 +0530
    tag.c: use 'ref-filter' APIs
    Make 'tag.c' use 'ref-filter' APIs for iterating through refs, sorting
    and printing of refs. This removes most of the code used in 'tag.c'
    replacing it with calls to the 'ref-filter' library.
    Make 'tag.c' use the 'filter_refs()' function provided by 'ref-filter'
    to filter out tags based on the options set.
    For printing tags we use 'show_ref_array_item()' function provided by
    'ref-filter'.
    We improve the sorting option provided by 'tag.c' by using the sorting
    options provided by 'ref-filter'. This causes the test 'invalid sort
    parameter on command line' in t7004 to fail, as 'ref-filter' throws an
    error for all sorting fields which are incorrect. The test is changed
    to reflect the same.
    Modify documentation for the same.
    Mentored-by: Christian Couder <christian.couder@gmail.com>
    Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
    Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Next: Junio C Hamano
Message 1 of 8 in “git tag --contains now takes a long time”
  1. Jerry SnitselaarOct 16, 2015
  2. Junio C HamanoOct 16, 2015
  3. Karthik NayakOct 17, 2015
  4. Jerry SnitselaarOct 17, 2015
  5. Matthieu MoyOct 17, 2015
  6. Karthik NayakOct 17, 2015
  7. Junio C HamanoOct 17, 2015
  8. Karthik NayakOct 18, 2015

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.