Branch
{gitStatusForActions?.branch ?? "(detached HEAD)"}
{activeDialogAction !== "commit" && (
<>
Upstream
{!gitStatusForActions || !gitStatusForActions.hasUpstream
? "No upstream configured"
: gitStatusForActions.aheadCount === 0 &&
gitStatusForActions.behindCount === 0
? "Up to date"
: gitStatusForActions.aheadCount > 0 &&
gitStatusForActions.behindCount > 0
? `Diverged (+${gitStatusForActions.aheadCount} / -${gitStatusForActions.behindCount})`
: gitStatusForActions.aheadCount > 0
? `Ahead by ${gitStatusForActions.aheadCount}`
: `Behind by ${gitStatusForActions.behindCount}`}
Working tree
{!gitStatusForActions || !gitStatusForActions.hasWorkingTreeChanges
? "Clean"
: `${gitStatusForActions.workingTree.files.length} file(s)`}
Diff
{!gitStatusForActions || !gitStatusForActions.hasWorkingTreeChanges ? (
"none"
) : (
<>
+{gitStatusForActions.workingTree.insertions}
/
-{gitStatusForActions.workingTree.deletions}
>
)}
>
)}
Files
{!gitStatusForActions || gitStatusForActions.workingTree.files.length === 0 ? (
none
) : (
{gitStatusForActions.workingTree.files.map((file) => (
))}
+{gitStatusForActions.workingTree.insertions}
/
-{gitStatusForActions.workingTree.deletions}
)}
{activeDialogAction === "commit" && (