Add a pack index 'virtual function' to fetch an index entry
Add a pack index 'virtual function' to fetch an index entry

Given an index entry number, the idx_get() function returns an
(version agnostic) index_entry structure containing all of the
information required to unpack the corresponding object from
the '.pack' file.

Since the v1 and v2 file formats differ in the layout of the
object records, we provide two implementations of the get
function and initialise the function pointer appropriately.

Signed-off-by: Ramsay Jones <3e74413778ce9c8bebbbaedfd56741f6850faeaf@ramsay1.demon.co.uk>

nacho/libgit2,zodiac/libgit2.js,jflesch/libgit2-mariadb,kissthink/libgit2,joshtriplett/libgit2,t0xicCode/libgit2,JIghtuse/libgit2,kissthink/libgit2,spraints/libgit2,t0xicCode/libgit2,skabel/manguse,stewid/libgit2,mhp/libgit2,zodiac/libgit2.js,swisspol/DEMO-libgit2,mcanthony/libgit2,kissthink/libgit2,chiayolin/libgit2,nacho/libgit2,evhan/libgit2,mingyaaaa/libgit2,ardumont/libgit2,magnus98/TEST,maxiaoqian/libgit2,nacho/libgit2,Aorjoa/libgit2_maked_lib,magnus98/TEST,amyvmiwei/libgit2,Corillian/libgit2,mrksrm/Mingijura,mhp/libgit2,yosefhackmon/libgit2,KTXSoftware/libgit2,saurabhsuniljain/libgit2,jamieleecool/ptest,magnus98/TEST,Tousiph/Demo1,Corillian/libgit2,oaastest/libgit2,Tousiph/Demo1,sim0629/libgit2,mrksrm/Mingijura,since2014/libgit2,JIghtuse/libgit2,since2014/libgit2,chiayolin/libgit2,Snazz2001/libgit2,ardumont/libgit2,skabel/manguse,iankronquist/libgit2,yosefhackmon/libgit2,joshtriplett/libgit2,Corillian/libgit2,jamieleecool/ptest,skabel/manguse,swisspol/DEMO-libgit2,oaastest/libgit2,nokiddin/libgit2,amyvmiwei/libgit2,Aorjoa/libgit2_maked_lib,falqas/libgit2,yongthecoder/libgit2,rcorre/libgit2,mhp/libgit2,zodiac/libgit2.js,oaastest/libgit2,swisspol/DEMO-libgit2,linquize/libgit2,Tousiph/Demo1,linquize/libgit2,mingyaaaa/libgit2,rcorre/libgit2,saurabhsuniljain/libgit2,KTXSoftware/libgit2,KTXSoftware/libgit2,skabel/manguse,nacho/libgit2,KTXSoftware/libgit2,maxiaoqian/libgit2,Corillian/libgit2,Aorjoa/libgit2_maked_lib,swisspol/DEMO-libgit2,kenprice/libgit2,whoisj/libgit2,rcorre/libgit2,magnus98/TEST,JIghtuse/libgit2,saurabhsuniljain/libgit2,mingyaaaa/libgit2,swisspol/DEMO-libgit2,whoisj/libgit2,iankronquist/libgit2,raybrad/libit2,whoisj/libgit2,stewid/libgit2,iankronquist/libgit2,since2014/libgit2,saurabhsuniljain/libgit2,chiayolin/libgit2,claudelee/libgit2,kenprice/libgit2,maxiaoqian/libgit2,MrHacky/libgit2,jflesch/libgit2-mariadb,t0xicCode/libgit2,amyvmiwei/libgit2,skabel/manguse,sim0629/libgit2,claudelee/libgit2,iankronquist/libgit2,leoyanggit/libgit2,amyvmiwei/libgit2,whoisj/libgit2,t0xicCode/libgit2,Corillian/libgit2,kenprice/libgit2,whoisj/libgit2,maxiaoqian/libgit2,Snazz2001/libgit2,MrHacky/libgit2,spraints/libgit2,yosefhackmon/libgit2,spraints/libgit2,mcanthony/libgit2,linquize/libgit2,Aorjoa/libgit2_maked_lib,nokiddin/libgit2,KTXSoftware/libgit2,MrHacky/libgit2,mhp/libgit2,maxiaoqian/libgit2,Snazz2001/libgit2,jeffhostetler/public_libgit2,yosefhackmon/libgit2,raybrad/libit2,dleehr/libgit2,kissthink/libgit2,chiayolin/libgit2,yosefhackmon/libgit2,sygool/libgit2,sygool/libgit2,yongthecoder/libgit2,jamieleecool/ptest,Corillian/libgit2,claudelee/libgit2,Tousiph/Demo1,joshtriplett/libgit2,nokiddin/libgit2,joshtriplett/libgit2,yongthecoder/libgit2,mingyaaaa/libgit2,oaastest/libgit2,falqas/libgit2,rcorre/libgit2,nokiddin/libgit2,iankronquist/libgit2,ardumont/libgit2,jflesch/libgit2-mariadb,stewid/libgit2,jamieleecool/ptest,evhan/libgit2,jeffhostetler/public_libgit2,whoisj/libgit2,mcanthony/libgit2,linquize/libgit2,jflesch/libgit2-mariadb,linquize/libgit2,sim0629/libgit2,joshtriplett/libgit2,joshtriplett/libgit2,dleehr/libgit2,falqas/libgit2,stewid/libgit2,mingyaaaa/libgit2,iankronquist/libgit2,saurabhsuniljain/libgit2,claudelee/libgit2,nokiddin/libgit2,Tousiph/Demo1,jeffhostetler/public_libgit2,rcorre/libgit2,jflesch/libgit2-mariadb,MrHacky/libgit2,leoyanggit/libgit2,t0xicCode/libgit2,mcanthony/libgit2,kenprice/libgit2,dleehr/libgit2,magnus98/TEST,oaastest/libgit2,mcanthony/libgit2,sim0629/libgit2,t0xicCode/libgit2,falqas/libgit2,mhp/libgit2,Aorjoa/libgit2_maked_lib,raybrad/libit2,dleehr/libgit2,falqas/libgit2,mrksrm/Mingijura,yongthecoder/libgit2,KTXSoftware/libgit2,kissthink/libgit2,sygool/libgit2,since2014/libgit2,leoyanggit/libgit2,magnus98/TEST,ardumont/libgit2,stewid/libgit2,JIghtuse/libgit2,zodiac/libgit2.js,spraints/libgit2,chiayolin/libgit2,jeffhostetler/public_libgit2,Tousiph/Demo1,ardumont/libgit2,linquize/libgit2,Snazz2001/libgit2,yongthecoder/libgit2,spraints/libgit2,JIghtuse/libgit2,swisspol/DEMO-libgit2,ardumont/libgit2,sygool/libgit2,leoyanggit/libgit2,sygool/libgit2,raybrad/libit2,raybrad/libit2,evhan/libgit2,sygool/libgit2,saurabhsuniljain/libgit2,mrksrm/Mingijura,jeffhostetler/public_libgit2,kissthink/libgit2,Snazz2001/libgit2,mhp/libgit2,evhan/libgit2,zodiac/libgit2.js,mrksrm/Mingijura,Snazz2001/libgit2,amyvmiwei/libgit2,JIghtuse/libgit2,mingyaaaa/libgit2,kenprice/libgit2,claudelee/libgit2,dleehr/libgit2,sim0629/libgit2,MrHacky/libgit2,since2014/libgit2,nokiddin/libgit2,mcanthony/libgit2,stewid/libgit2,yosefhackmon/libgit2,mrksrm/Mingijura,claudelee/libgit2,yongthecoder/libgit2,MrHacky/libgit2,oaastest/libgit2,amyvmiwei/libgit2,rcorre/libgit2,chiayolin/libgit2,jeffhostetler/public_libgit2,falqas/libgit2,jflesch/libgit2-mariadb,leoyanggit/libgit2,spraints/libgit2,maxiaoqian/libgit2,since2014/libgit2,kenprice/libgit2,leoyanggit/libgit2,skabel/manguse,dleehr/libgit2,sim0629/libgit2