Speed up git notes lookup
commit3c63d9f03e440857a684cc453f1761a103c418b0
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 19 Dec 2008 17:44:42 +0000 (19 18:44 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 20 Dec 2008 11:58:06 +0000 (20 12:58 +0100)
treea4e545f19ec761e25ac3a061f92ea2ab732186b5
parenta6ffa498843d52043748a92501f9e06c35ea1cc6
Speed up git notes lookup

To avoid looking up each and every commit in the notes ref's tree
object, which is very expensive, speed things up by slurping the tree
object's contents into a hash_map.

The idea fo the hashmap singleton is from David Reiss, initial
benchmarking by Jeff King.

Note: the implementation allows for arbitrary entries in the notes
tree object, ignoring those that do not reference a valid object.  This
allows you to annotate arbitrary branches, or objects.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
notes.c