vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

The stashes with parent commits older than the oldest stash are not visible on branches

Open sergeibbb opened this issue 8 months ago • 0 comments

Description

It's related to #4353 but it's not a new problem. It has rather been uncovered by those changes.

The problem

The stashes with parent commits older than the oldest stash are not visible on branches in Repository view

Steps to reproduce

  1. delete all stashes or have a fresh repository
  2. create a branch and checkout to it
  3. make some changes and stash them
  4. enable stashes on Repository view Image
  5. go to the Repository view

Expected result You see your new stash on your branch

Actual result You don't see the stash

Explanation

The date of the stash that we look at in stash.ts is not that date that we want to use to the refs that we want to find. It should be the date of the parent commit of the oldest stash rather than the date of the stash itself.

Possible solution

Rather than look for an oldest stash we should look for a stash with an oldest parent commit.

GitLens Version

2025.6.1405

VS Code Version

No response

Git Version

No response

Logs, Screenshots, Screen Captures, etc

No response

sergeibbb avatar Jun 16 '25 14:06 sergeibbb