Branch
{gitStatus?.branch ?? "(detached HEAD)"}
{activeDialogAction !== "commit" && (
<>
Upstream
{!gitStatus || !gitStatus.hasUpstream
? "No upstream configured"
: gitStatus.aheadCount === 0 && gitStatus.behindCount === 0
? "Up to date"
: gitStatus.aheadCount > 0 && gitStatus.behindCount > 0
? `Diverged (+${gitStatus.aheadCount} / -${gitStatus.behindCount})`
: gitStatus.aheadCount > 0
? `Ahead by ${gitStatus.aheadCount}`
: `Behind by ${gitStatus.behindCount}`}
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.map((file) => (
))}
+{gitStatus.workingTree.insertions}
/
-{gitStatus.workingTree.deletions}
)}
{activeDialogAction === "commit" && (