Description
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
- delete all stashes or have a fresh repository
- create a branch and checkout to it
- make some changes and stash them
- enable stashes on Repository view
- 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.
Verification steps
Graph structure:

GitLens Version
2025.6.1405
VS Code Version
No response
Git Version
No response
Logs, Screenshots, Screen Captures, etc
No response