feat(git): rename remote branches atomically via push

Adds a new command to rename remote branches and update tracking refs.
Renaming remote refs is performed atomically using a single push.
The push creates the new remote ref and deletes the old if it succeeds.
The frontend now invokes remote-rename when needed and shows labels.

- Atomic remote rename via push with create/ref and delete
- Frontend supports remote branch renames from the branch panel
- Compare UI now shows labels for remote refs in results
This commit is contained in:
Christoph Brandau
2026-08-13 18:32:16 +02:00
parent ca14fac90c
commit f43fe00873
11 changed files with 447 additions and 71 deletions
+9 -5
View File
@@ -20,6 +20,8 @@
comparison: GitCommitComparison;
selectedDiffPath: string;
isBusy: boolean;
fromLabel?: string;
toLabel?: string;
restoreLabel?: string;
/** When opened from a search hit, the term to highlight on matching lines. */
highlightQuery?: string;
@@ -32,6 +34,8 @@
comparison,
selectedDiffPath = "",
isBusy = false,
fromLabel = "",
toLabel = "",
restoreLabel = "",
highlightQuery = "",
onClose = () => {},
@@ -219,15 +223,15 @@
class="dialog-backdrop compare-dialog-backdrop"
role="presentation"
>
<div class="dialog compare-dialog" role="dialog" aria-modal="true" aria-label="Commit comparison" tabindex="-1">
<div class="dialog compare-dialog" role="dialog" aria-modal="true" aria-label="Branch or commit comparison" tabindex="-1">
<header class="dialog-header">
<div>
<span class="eyebrow">Compare</span>
<h2 class="dialog-range">
<span class="hash">{comparison.from_short}</span>
<span class="hash" title={comparison.from_hash}>{fromLabel || comparison.from_short}</span>
<ArrowRight size={14} aria-hidden="true" />
<span class="hash">{comparison.to_short}</span>
<span class="hash" title={comparison.to_hash}>{toLabel || comparison.to_short}</span>
</h2>
</div>
<div class="dialog-header-actions">
@@ -289,11 +293,11 @@
<div class="split-col-headers">
<div class="split-col-label">
<span>Before</span>
<span class="split-col-hash">{comparison.from_short}</span>
<span class="split-col-hash" title={comparison.from_hash}>{fromLabel || comparison.from_short}</span>
</div>
<div class="split-col-label">
<span>After</span>
<span class="split-col-hash">{comparison.to_short}</span>
<span class="split-col-hash" title={comparison.to_hash}>{toLabel || comparison.to_short}</span>
</div>
</div>