Branch
{gitStatus?.branch ?? "(detached HEAD)"}
{!showCompactStatusCard && (
<>
Upstream
{gitStatus
? formatUpstreamStatus({
hasUpstream: gitStatus.hasUpstream,
aheadCount: gitStatus.aheadCount,
behindCount: gitStatus.behindCount,
})
: "unknown"}
Working tree
{!gitStatus || !gitStatus.hasWorkingTreeChanges
? "Clean"
: `${gitStatus.workingTree.files.length} file(s)`}
Diff
{!gitStatus || !gitStatus.hasWorkingTreeChanges ? (
"none"
) : (
<>
+{gitStatus.workingTree.insertions}
/
-{gitStatus.workingTree.deletions}
>
)}
>
)}
Files
{!gitStatus || gitStatus.workingTree.files.length === 0 ? (
none
) : (
{gitStatus.workingTree.files.slice(0, 6).map((file) => (
))}
{gitStatus.workingTree.files.length > 6 && (
+{gitStatus.workingTree.files.length - 6} more
)}
)}
{activeDialogAction === "commit" && (