index: zero the size of racily-clean entries
index: zero the size of racily-clean entries

If a file entry has the same timestamp as the index itself, it is
considered racily-clean, as it may have been modified after the index
was written, but during the same second. We take extra steps to check
the contents, but this is just one part of avoiding races.

For files which do have changes but have not been updated in the index,
updating the on-disk index means updating its timestamp, which means we
would no longer recognise these entries as racy and we would trust the
timestamp to tell us whether they have changed.

In order to work around this, git zeroes out the file-size field in
entries with the same timestamp as the index in order to force the next
diff to check the contents. Do so in libgit2 as well.

mcanthony/libgit2,kissthink/libgit2,ardumont/libgit2,iankronquist/libgit2,skabel/manguse,dleehr/libgit2,saurabhsuniljain/libgit2,stewid/libgit2,spraints/libgit2,mcanthony/libgit2,KTXSoftware/libgit2,claudelee/libgit2,nokiddin/libgit2,stewid/libgit2,jeffhostetler/public_libgit2,stewid/libgit2,iankronquist/libgit2,MrHacky/libgit2,saurabhsuniljain/libgit2,claudelee/libgit2,mcanthony/libgit2,spraints/libgit2,skabel/manguse,kissthink/libgit2,ardumont/libgit2,linquize/libgit2,saurabhsuniljain/libgit2,Tousiph/Demo1,sygool/libgit2,iankronquist/libgit2,kissthink/libgit2,yongthecoder/libgit2,mhp/libgit2,mhp/libgit2,mingyaaaa/libgit2,Tousiph/Demo1,linquize/libgit2,JIghtuse/libgit2,stewid/libgit2,kenprice/libgit2,falqas/libgit2,yosefhackmon/libgit2,yosefhackmon/libgit2,iankronquist/libgit2,Corillian/libgit2,mcanthony/libgit2,spraints/libgit2,skabel/manguse,stewid/libgit2,saurabhsuniljain/libgit2,iankronquist/libgit2,Corillian/libgit2,since2014/libgit2,oaastest/libgit2,MrHacky/libgit2,saurabhsuniljain/libgit2,dleehr/libgit2,yongthecoder/libgit2,mcanthony/libgit2,claudelee/libgit2,stewid/libgit2,t0xicCode/libgit2,nokiddin/libgit2,leoyanggit/libgit2,falqas/libgit2,falqas/libgit2,mingyaaaa/libgit2,falqas/libgit2,magnus98/TEST,skabel/manguse,JIghtuse/libgit2,yosefhackmon/libgit2,Corillian/libgit2,claudelee/libgit2,mrksrm/Mingijura,yosefhackmon/libgit2,skabel/manguse,dleehr/libgit2,sygool/libgit2,t0xicCode/libgit2,linquize/libgit2,kenprice/libgit2,yongthecoder/libgit2,iankronquist/libgit2,sim0629/libgit2,jeffhostetler/public_libgit2,kissthink/libgit2,mhp/libgit2,yongthecoder/libgit2,kenprice/libgit2,sygool/libgit2,joshtriplett/libgit2,yongthecoder/libgit2,kenprice/libgit2,spraints/libgit2,Corillian/libgit2,claudelee/libgit2,sim0629/libgit2,sygool/libgit2,ardumont/libgit2,KTXSoftware/libgit2,leoyanggit/libgit2,ardumont/libgit2,MrHacky/libgit2,dleehr/libgit2,skabel/manguse,MrHacky/libgit2,mhp/libgit2,mingyaaaa/libgit2,joshtriplett/libgit2,joshtriplett/libgit2,sim0629/libgit2,ardumont/libgit2,leoyanggit/libgit2,leoyanggit/libgit2,yosefhackmon/libgit2,Corillian/libgit2,nokiddin/libgit2,jeffhostetler/public_libgit2,Tousiph/Demo1,mrksrm/Mingijura,KTXSoftware/libgit2,mrksrm/Mingijura,mrksrm/Mingijura,mrksrm/Mingijura,magnus98/TEST,magnus98/TEST,JIghtuse/libgit2,MrHacky/libgit2,linquize/libgit2,KTXSoftware/libgit2,saurabhsuniljain/libgit2,falqas/libgit2,Tousiph/Demo1,t0xicCode/libgit2,Corillian/libgit2,since2014/libgit2,JIghtuse/libgit2,ardumont/libgit2,joshtriplett/libgit2,mingyaaaa/libgit2,KTXSoftware/libgit2,oaastest/libgit2,JIghtuse/libgit2,joshtriplett/libgit2,kissthink/libgit2,leoyanggit/libgit2,mcanthony/libgit2,Tousiph/Demo1,magnus98/TEST,yosefhackmon/libgit2,claudelee/libgit2,dleehr/libgit2,mhp/libgit2,joshtriplett/libgit2,dleehr/libgit2,oaastest/libgit2,KTXSoftware/libgit2,t0xicCode/libgit2,JIghtuse/libgit2,t0xicCode/libgit2,sygool/libgit2,leoyanggit/libgit2,mingyaaaa/libgit2,oaastest/libgit2,kissthink/libgit2,sim0629/libgit2,nokiddin/libgit2,oaastest/libgit2,mingyaaaa/libgit2,linquize/libgit2,jeffhostetler/public_libgit2,mhp/libgit2,linquize/libgit2,sim0629/libgit2,since2014/libgit2,kenprice/libgit2,Tousiph/Demo1,spraints/libgit2,jeffhostetler/public_libgit2,falqas/libgit2,oaastest/libgit2,kenprice/libgit2,since2014/libgit2,since2014/libgit2,sygool/libgit2,jeffhostetler/public_libgit2,spraints/libgit2,magnus98/TEST,since2014/libgit2,nokiddin/libgit2,nokiddin/libgit2,yongthecoder/libgit2,mrksrm/Mingijura,magnus98/TEST,t0xicCode/libgit2,sim0629/libgit2,MrHacky/libgit2