message: Show commit hash if it has no name.
diff: @@ -119,6 +119,7 @@ type BranchesOptions = {
  };
  export async function currentBranchName(directory: GitDirectoryPath): Promise<string> {
  + try {
  const output = await executeCommand(
  "git",
  ['"symbolic-ref"', '"--short"', '"-q"', '"HEAD"'],
  @@ -126,6 +127,16 @@ export async function currentBranchName(directory: GitDirectoryPath): Promise<st
  );
  return output.trim();
  + } catch (error) {
  + // Doesn't have a name.
  + const output = await executeCommand(
  + "git",
  + ['"rev-parse"', '"--short"', '"HEAD"'],
  + directory,
  + );
  +
  + return output.trim();
  + }
  }
  export enum RepositoryState {
  