Skip to content

feat(git): mark the last pushed commit in history - #3227

Merged
abose merged 2 commits into
mainfrom
ai
Sep 28, 2026
Merged

abose merged 2 commits into
mainfrom
ai

Conversation

@abose

@abose abose commented Sep 27, 2026

Copy link
Copy Markdown
Member

No description provided.

Opening a project that has no repository still refreshes the panel, so
`git remote -v` runs and reports there is no repository. That landed as a
modal error over the editor — for the project the user had just chosen
themselves, and on every switch to a non-git folder.

Treat that one failure as the ordinary condition it is: clear the remote
picker and keep the reason in the log. Every other remotes failure still
raises the dialog.
The history table listed every commit alike, so nothing said which of them
the remote already has, or whether the branch had ever been pushed at all.

Draw a waterline where the remote's branch points. Commits above it carry
the same orange left edge the gutter puts on a modified line, so "edge
means not saved upstream yet" reads the same in the editor and here. The
marker takes its colour from the state it describes: blue while there is
nothing to push, orange once commits are waiting, so the run of orange
above closes on an orange line and reads as one mark. A branch with no
counterpart on the remote gets a "not pushed" banner instead, closed off
at the initial commit once the whole history is on screen.

Where the remote points comes from one `for-each-ref` reading the branch
and the remote ref together — the branch row carries the upstream's name,
the remote row the hash. A branch tracking some other ref needs a second
call; nothing else does, and paging costs none, since the answer latches
once the waterline is placed.

File history is left alone: it lists only the commits touching one file,
so the remote's head is usually not among them and every row would be
wrongly called local.
@sonarqubecloud

Copy link
Copy Markdown

@abose
abose merged commit 84b7f81 into main Sep 28, 2026
14 of 21 checks passed
@abose
abose deleted the ai branch September 28, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant