stash: use a transaction to modify the reflog
stash: use a transaction to modify the reflog

The stash is implemented as the refs/stash reference and its reflog. In
order to modify the reflog, we need avoid races by making sure we're the
only ones allowed to modify the reflog.

We achieve this via the transactions API. Locking the reference gives us
exclusive write access, letting us modify and write it without races.

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