Correct a PHP8 compatibility issue when running "arc diff" with no active branch
Summary: Ref T13588. See PHI2228. When there is no active branch name (for example, because you are in Git on a detached HEAD), this section currently fails under PHP8 when we try to strlen(null).
Test Plan: Under PHP 8.1: ran git checkout <hash of head>, then arc diff to generate this revision.
Maniphest Tasks: T13588
Differential Revision: https://secure.phabricator.com/D21856