Scan master or branches first

Check sha in all branches and check previous
commits in master first