current branch should never be null as all git repositories have at least one branch. When repository object is created it always sets the branch