index: Correctly write entry mode
index: Correctly write entry mode

The entry mode flags for an entry created from a path name were not
correctly written if the entry was a symlink. The st_mode of a statted
symlink is 0120777, however git requires the mode to read 0120000,
because it does not care about permissions of symlinks.

Introduce index_create_mode() that correctly writes the mode flags in
the form expected by git.

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