{#if loading && !gitStatus}
{:else if error && !gitStatus}

Unable to load changes

{error}

{:else if !gitStatus?.is_repo}

Not a git repository

{:else}
{gitStatus.branch || 'HEAD'} {#if gitStatus.upstream} {gitStatus.upstream} {/if} {#if gitStatus.ahead > 0} +{gitStatus.ahead} {/if} {#if gitStatus.behind > 0} -{gitStatus.behind} {/if} {#if totalChanges > 0} {totalChanges} changed {/if}
{#if totalChanges > 0}
Uncommitted {totalChanges} {totalChanges === 1 ? 'change' : 'changes'}
{/if}
{#if totalChanges === 0}

No file changes yet

Changes in this project will appear here.

{:else}
{#each reviewFiles as file (file.key)} {@const parts = pathParts(file.path)} {@const meta = statusMeta(file.status)}
{#if file.expanded}
{#if file.diffFiles.some((diffFile) => diffFile.hunks.length > 0)} {#each file.diffFiles as diffFile} {#if file.diffFiles.length > 1}
{diffFile.path}
{/if} {#each diffFile.hunks as hunk}
{hunk.header}
{#each groupLines(numberedLines(hunk)) as group}
{#each group.lines as line}
{line.oldNumber ?? ''} {line.newNumber ?? ''} {linePrefix(line.type)} {line.content || ' '}
{/each}
{/each} {/each} {/each} {:else}
No textual diff available
{/if}
{/if}
{/each}
{/if}
{/if}