sha1-lookup: add new "sha1_pos" function to efficiently lookup sha1
commit96beef8c2efaab06f703991ed7802b8cef4c00e3
authorChristian Couder <chriscool@tuxfamily.org>
Sat, 4 Apr 2009 20:59:26 +0000 (4 22:59 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 5 Apr 2009 05:57:39 +0000 (4 22:57 -0700)
tree06274738bafabc3d1c523a30732cfa6a92438885
parente96f3689ecd95997a2a474c2b7f21b0a67f138b1
sha1-lookup: add new "sha1_pos" function to efficiently lookup sha1

This function has been copied from the "patch_pos" function in
"patch-ids.c" but an additional parameter has been added.

The new parameter is a function pointer, that is used to access the
sha1 of an element in the table.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1-lookup.c
sha1-lookup.h