Fix fail clone local repo which head detatched
Fix fail clone local repo which head detatched

Set head detach if can't found branch after download

Signed-off-by: Frank Li <b99eefcf732eea439715b026468a4bc1ee869eb4@gmail.com>

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