git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What is an efficient way to get all blobs / trees that have notes attached?
@ 2016-04-01 10:51 Sebastian Schuberth
  2016-04-01 12:16 ` Johan Herland
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Schuberth @ 2016-04-01 10:51 UTC (permalink / raw)
  To: git

Hi,

I'm curious whether there's a more efficient way to get a list of blobs 
/ trees (and their names) that have notes attached than doing this:

1) Get all notes refs I'm interested in (git-for-each-ref).

2) For each notes ref, get the list of notes (git-notes list) and store 
them in a hash table that maps object hashes to notes.

3) Recursively list all blobs / trees (git-ls-tree) and look whether an 
object's hash is conatined in our table to get its notes.

In particular 3) could be expensive for repos with a lot of files as 
we're looking at all of them just to see whether they have notes attached.

Regards,
Sebastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-04 17:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-01 10:51 What is an efficient way to get all blobs / trees that have notes attached? Sebastian Schuberth
2016-04-01 12:16 ` Johan Herland
2016-04-01 12:23   ` Johan Herland
2016-04-04  7:46   ` Sebastian Schuberth
2016-04-04 17:33     ` Johan Herland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).