Fix a crash issue if there is not master branch.
Fix a crash issue if there is not master branch.

Repo step:
1. Create a project.
2. git push http://xxxxx.git  master:test
3. Browse files from web.
4. Crash.

Root cause:
If the branch is not master, in RepositoryBrowser::TryGetBrunch(),
_repository.Head.Target will be null. _repository.Head.Target.Hash
will throw a null reference exception.

Fix:
if _repository.Head.Target is null, use the first branch as the default
branch.

Webmine/Bonobo-Git-Server,jiangzm/Bonobo-Git-Server,crowar/Bonobo-Git-Server,padremortius/Bonobo-Git-Server,jiangzm/Bonobo-Git-Server,yonglehou/Bonobo-Git-Server,NipponSysits/IIS.Git-Connector,larrynung/Bonobo-Git-Server,Monepi/Bonobo-Git-Server,hakim89/Bonobo-Git-Server,larshg/Bonobo-Git-Server,Acute-sales-ltd/Bonobo-Git-Server,anyeloamt1/Bonobo-Git-Server,Ollienator/Bonobo-Git-Server,crowar/Bonobo-Git-Server,anyeloamt1/Bonobo-Git-Server,jiangzm/Bonobo-Git-Server,hakim89/Bonobo-Git-Server,larrynung/Bonobo-Git-Server,willdean/Bonobo-Git-Server,jiangzm/Bonobo-Git-Server,padremortius/Bonobo-Git-Server,crowar/Bonobo-Git-Server,braegelno5/Bonobo-Git-Server,KiritoStudio/Bonobo-Git-Server,crowar/Bonobo-Git-Server,Acute-sales-ltd/Bonobo-Git-Server,hakim89/Bonobo-Git-Server,RedX2501/Bonobo-Git-Server,larshg/Bonobo-Git-Server,dunderburken/Bonobo-Git-Server,Webmine/Bonobo-Git-Server,NipponSysits/IIS.Git-Connector,willdean/Bonobo-Git-Server,Ollienator/Bonobo-Git-Server,larrynung/Bonobo-Git-Server,hakim89/Bonobo-Git-Server,kfarnung/Bonobo-Git-Server,PGM-NipponSysits/IIS.Git-Connector,yonglehou/Bonobo-Git-Server,YelaSeamless/Bonobo-Git-Server,anyeloamt1/Bonobo-Git-Server,gencer/Bonobo-Git-Server,lkho/Bonobo-Git-Server,yonglehou/Bonobo-Git-Server,larrynung/Bonobo-Git-Server,crowar/Bonobo-Git-Server,darioajr/Bonobo-Git-Server,snoopydo/Bonobo-Git-Server,Acute-sales-ltd/Bonobo-Git-Server,forgetz/Bonobo-Git-Server,Acute-sales-ltd/Bonobo-Git-Server,forgetz/Bonobo-Git-Server,lkho/Bonobo-Git-Server,KiritoStudio/Bonobo-Git-Server,YelaSeamless/Bonobo-Git-Server,KiritoStudio/Bonobo-Git-Server,larshg/Bonobo-Git-Server,Ollienator/Bonobo-Git-Server,dunderburken/Bonobo-Git-Server,snoopydo/Bonobo-Git-Server,KiritoStudio/Bonobo-Git-Server,dunderburken/Bonobo-Git-Server,jiangzm/Bonobo-Git-Server,larrynung/Bonobo-Git-Server,willdean/Bonobo-Git-Server,Ollienator/Bonobo-Git-Server,larrynung/Bonobo-Git-Server,NipponSysits/IIS.Git-Connector,larshg/Bonobo-Git-Server,anyeloamt1/Bonobo-Git-Server,darioajr/Bonobo-Git-Server,snoopydo/Bonobo-Git-Server,forgetz/Bonobo-Git-Server,PGM-NipponSysits/IIS.Git-Connector,padremortius/Bonobo-Git-Server,gencer/Bonobo-Git-Server,forgetz/Bonobo-Git-Server,NipponSysits/IIS.Git-Connector,snoopydo/Bonobo-Git-Server,NipponSysits/IIS.Git-Connector,padremortius/Bonobo-Git-Server,jiangzm/Bonobo-Git-Server,braegelno5/Bonobo-Git-Server,RedX2501/Bonobo-Git-Server,Ollienator/Bonobo-Git-Server,PGM-NipponSysits/IIS.Git-Connector,dunderburken/Bonobo-Git-Server,yonglehou/Bonobo-Git-Server,willdean/Bonobo-Git-Server,Acute-sales-ltd/Bonobo-Git-Server,KiritoStudio/Bonobo-Git-Server,yonglehou/Bonobo-Git-Server,NipponSysits/IIS.Git-Connector,PGM-NipponSysits/IIS.Git-Connector,yonglehou/Bonobo-Git-Server,PGM-NipponSysits/IIS.Git-Connector,kfarnung/Bonobo-Git-Server,Monepi/Bonobo-Git-Server,YelaSeamless/Bonobo-Git-Server,YelaSeamless/Bonobo-Git-Server,willdean/Bonobo-Git-Server,padremortius/Bonobo-Git-Server,padremortius/Bonobo-Git-Server,snoopydo/Bonobo-Git-Server,RedX2501/Bonobo-Git-Server,darioajr/Bonobo-Git-Server,hakim89/Bonobo-Git-Server,Monepi/Bonobo-Git-Server,igoryok-zp/Bonobo-Git-Server,KiritoStudio/Bonobo-Git-Server,Acute-sales-ltd/Bonobo-Git-Server,Webmine/Bonobo-Git-Server,Webmine/Bonobo-Git-Server,PGM-NipponSysits/IIS.Git-Connector,Monepi/Bonobo-Git-Server,kfarnung/Bonobo-Git-Server,dunderburken/Bonobo-Git-Server,hakim89/Bonobo-Git-Server,dunderburken/Bonobo-Git-Server,gencer/Bonobo-Git-Server,braegelno5/Bonobo-Git-Server,Monepi/Bonobo-Git-Server,kfarnung/Bonobo-Git-Server,igoryok-zp/Bonobo-Git-Server,YelaSeamless/Bonobo-Git-Server,igoryok-zp/Bonobo-Git-Server,lkho/Bonobo-Git-Server,Acute-sales-ltd/Bonobo-Git-Server,snoopydo/Bonobo-Git-Server,lkho/Bonobo-Git-Server,Webmine/Bonobo-Git-Server,gencer/Bonobo-Git-Server,YelaSeamless/Bonobo-Git-Server,darioajr/Bonobo-Git-Server,darioajr/Bonobo-Git-Server,braegelno5/Bonobo-Git-Server,RedX2501/Bonobo-Git-Server,Webmine/Bonobo-Git-Server,igoryok-zp/Bonobo-Git-Server,crowar/Bonobo-Git-Server,Ollienator/Bonobo-Git-Server,darioajr/Bonobo-Git-Server,Monepi/Bonobo-Git-Server