Skip to content

git: Fix conflicted paths not getting cleared#50327

Merged
cole-miller merged 5 commits intomainfrom
fix-git-store-conflicted-paths
Mar 2, 2026
Merged

git: Fix conflicted paths not getting cleared#50327
cole-miller merged 5 commits intomainfrom
fix-git-store-conflicted-paths

Conversation

@cole-miller
Copy link
Copy Markdown
Member

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • Fixed a bug where files would still be marked as having git conflicts after resolving them.

bennetbo and others added 3 commits February 27, 2026 17:56
M# Please enter the commit message for your changes. Lines starting
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 27, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Feb 27, 2026
}
}
}
RepositoryEvent::BranchChanged | RepositoryEvent::MergeHeadsChanged => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is intended, but removing this event will break the auto update of the graph for new commits. Just wanted to point it out.

Copy link
Copy Markdown
Member Author

@cole-miller cole-miller Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think BranchChanged is also emitted when the HEAD commit moves, right? Was MergeHeadsChanged picking up any situation where HEAD hasn't changed but we do want to update the graph?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it should be emitted! But i had a case where it wasn't but the graph should been updated. But I can't remember the exact case, tried testing what I tested back then but can't reproduce it anymore. So you can probably ignore my comment :)

Copy link
Copy Markdown
Member Author

@cole-miller cole-miller Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 one thing that I'm sure we don't catch with the current setup is when you do a fetch and remote branches update, I would be down to emit an event in that case so the git graph knows to rebuild (if it shows remote branches). And happy to add another event to replace this one if it turns out the graph needs it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah your right we don't update on remote change yet. Happy to look into that if you haven't done it already.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be great!

@cole-miller cole-miller enabled auto-merge (squash) March 2, 2026 13:28
@cole-miller cole-miller merged commit db02d09 into main Mar 2, 2026
28 checks passed
@cole-miller cole-miller deleted the fix-git-store-conflicted-paths branch March 2, 2026 13:40
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed a bug where files would still be marked as having git conflicts
after resolving them.

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants