Skip to content

fix(#2382): git watcher handles worktrees and submodules, via --absolute-git-dir when it is available #2389

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

Merged
merged 8 commits into from
Sep 2, 2023

Conversation

alex-courtis
Copy link
Member

fixes #2382

This is clunky: using yet another map for project roots is fragile and not easily maintainable.

Possible refactor: make get_project_root private, migrating to get_project or similar. Trim down init to do nothing but create the entire project and watchers.

@alex-courtis alex-courtis changed the title fix(#2382): use --absolute-git-dir when available fix(#2382): use --absolute-git-dir when available Aug 27, 2023
@alex-courtis
Copy link
Member Author

#2390 supercedes

@alex-courtis
Copy link
Member Author

#2390 failed. Use this pragmatic but messy solution.

@alex-courtis alex-courtis reopened this Aug 28, 2023
@alex-courtis
Copy link
Member Author

Tidied naming, documented and added more safety.

Dogfooding for ~1 week.

More refactoring might follow.

@alex-courtis
Copy link
Member Author

Later refactor:

  • add toplevel and git_dir to project
  • make get_toplevel private
  • externals use get_project instead of get_toplevel

@alex-courtis alex-courtis changed the title fix(#2382): use --absolute-git-dir when available fix(#2382): git watcher handles worktrees and submodules, via --absolute-git-dir when it is available Sep 2, 2023
@alex-courtis alex-courtis merged commit 28c3980 into master Sep 2, 2023
@alex-courtis alex-courtis deleted the 2382-submodule-worktree-git-dir branch September 2, 2023 02:05
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.

git submodule/worktree watcher incorrect
1 participant