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

Get all tips quickly

From
Kirill Likhodedov <kirill.likhodedov@jetbrains.com>
Date
Apr 13, 2014, 14:19 UTC
Message-ID
<4A7A3A96-DC10-4748-BBCC-F52F48977022@jetbrains.com>
Hi, 
What is fastest possible way to get all “tips” (leafs of the Git log graph) in a Git repository with hashes of commits they point to?

We at JetBrains are tuning performance of Git log integration in our IntelliJ IDEA and want to get all tips as fast as possible. Currently we use 'git log —branches --tags --remotes --no-walk’, but the problem is that it is slow if there are a lot of references. In our repository we have about 35K tags, and therefore the tags is the main slowdown. On the other hand, we have just a couple of dozens of tips as well as branch references, and `git log --branches --remotes` is very fast.

So we are searching a way to get tags pointing to the graph leafs faster. 
We also tried to read tags by manually parsing .git files (it is faster than invoking git log), but unfortunately annotated tags in .git/refs/tags/ are written without the hashes they point to (unlike .git/packed-refs).
And that’s a pity that `git tag` doesn’t show the hashes.
Thanks a lot for any help!

----- Kirill Likhodedov JetBrains http://www.jetbrains.com "Develop with pleasure!"

Next: Ævar Arnfjörð Bjarmason
Message 1 of 4 in “Get all tips quickly”
  1. Kirill LikhodedovApr 13, 2014
  2. Ævar Arnfjörð BjarmasonApr 13, 2014
  3. Michael HaggertyApr 13, 2014
  4. Kirill LikhodedovApr 14, 2014

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.