Fix bug when join_n refers to original buffer
Fix bug when join_n refers to original buffer

There was a bug in git_buf_join_n when the contents of the
original buffer were joined into itself and the realloc
moved the pointer to the original buffer.

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