tree-cache: don't error out on a childless invalidated entry
tree-cache: don't error out on a childless invalidated entry

The code used to assume that there had to be data after the newline in
a tree cache extension entry. This isn't true for a childless
invalidated entry if it's the last one, as there won't be any children
nor a hash to take up space.

Adapt the off-by-one comparison to also work in this case. Fixes #633.

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