Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move git status out of Entry #22224

Merged
merged 39 commits into from
Jan 4, 2025
Merged

Move git status out of Entry #22224

merged 39 commits into from
Jan 4, 2025

Conversation

mikayla-maki
Copy link
Contributor

@mikayla-maki mikayla-maki commented Dec 19, 2024

  • Rewrite worktree git handling
  • Fix tests
  • Fix test_propagate_statuses_for_repos_under_project
  • Replace WorkDirectoryEntry with WorkDirectory in RepositoryEntry
  • Add a worktree event for capturing git status changes
  • Confirm that the local repositories are correctly updating the new WorkDirectory field
  • Implement the git statuses query as a join when pulling entries out of worktree
  • Use this new join to implement the project panel and outline panel.
  • Synchronize git statuses over the wire for collab and remote dev (use the existing worktree_repository_statuses table, adjust as needed)
  • Only send changed statuses to collab

Release Notes:

  • N/A

cole-miller and others added 4 commits December 16, 2024 09:51

This comment was marked as resolved.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 19, 2024
@cole-miller cole-miller marked this pull request as ready for review January 3, 2025 23:00
@mikayla-maki mikayla-maki enabled auto-merge January 4, 2025 00:01
@maxdeviant
Copy link
Member

maxdeviant commented Jan 4, 2025

Should we take 8c352ef out of this PR since it isn't related (and adds a lot of additional surface area being touched)?

Seems like it could easily be a separate PR.

@mikayla-maki
Copy link
Contributor Author

mikayla-maki commented Jan 4, 2025

@maxdeviant no, when we ran the typos CLI locally to fix typo failures on this branch, this is what it gave us.

@mikayla-maki mikayla-maki added this pull request to the merge queue Jan 4, 2025
Merged via the queue into main with commit 9613084 Jan 4, 2025
14 checks passed
@mikayla-maki mikayla-maki deleted the cole/git-panel branch January 4, 2025 01:16
github-merge-queue bot pushed a commit that referenced this pull request Jan 9, 2025
* Follows-up #22224 , by
adjusting `impl PartialEq for OutlineEntryOutline` to compare outline
items' values too.
Before that, all outline items from the same excerpt were considered
equal.

Adds a test for this

* Stops re-revealing items in the outline panel, when it's focused: now,
when someone scrolls over outline panel items, there is no extra work
happening: the "revealed" item is the one scrolled to

Release Notes:

- Fixed outline items not scrolling properly
@williamdes
Copy link
Contributor

williamdes commented Jan 14, 2025

Hi,

I am sorry to have to report this only now, after some serious git bisect I found that this PR merge is the one that broke my git support for repos in sub-folders

  • open Zed in a repo folder -> git works (commit author, date) on each line of code
  • open Zed in a folder that has sub-projects -> no git support
  • open Zed in a folder that has sub(no .git)-sub(no .git)-sub(no .git)-projects(a .git foreach) -> no git support

Can you fix it ?
Time to sleep for me, but this is so annoying that I may try to debug further tomorrow

Before:
image
image

After:
image

@cole-miller
Copy link
Contributor

Hi @williamdes, thanks for the report. Could you point me to a specific repo where the git blame is not showing up for you after this change? I've tried to reproduce the issue with some simple test projects and inline git blame seems to work fine in at least the following situations:

  • A/B and A/C are git repositories and A is not; open A with Zed.
  • A/B/C is a git repository, A and A/B are not; open A with Zed.
  • A and A/B are both git repositories; open A with Zed.

@williamdes
Copy link
Contributor

Hi @cole-miller

Could you point me to a specific repo where the git blame is not showing up for you after this change?

Every repository is affected.
Worktree or simple repo.

I do the following pattern to sort my repos:

- /mnt/Dev/@project-name/ <- I open Zed here
    - /mnt/Dev/@project-name/www
    - /mnt/Dev/@project-name/api
- /mnt/Dev/@williamdes <- I open Zed here sometimes
- /mnt/Dev/@williamdes/@forked-repos <- I open Zed here
    - /mnt/Dev/@williamdes/@forked-repos/zed
    - /mnt/Dev/@williamdes/@forked-repos/phpmyadmin

If I open /mnt/Dev/@project-name after this PR no git is detected, see screenshot where even the tree show no detection
But if I open /mnt/Dev/@project-name/api it works

Stupid possibility, could it be the folder name ?
Or could it be because sometimes I open zed in a folder and add some more @folders that I also need

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants