Fix corner case in reference renaming
Fix corner case in reference renaming

Renaming a packed reference should not pack another reference
which happens to be in both loose and pack state.

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