ZIm/crates/git/src
Thorsten Ball bd03dea296
git: Add support for opening git worktrees (#20164)
This adds support for [git
worktrees](https://matklad.github.io/2024/07/25/git-worktrees.html). It
fixes the errors that show up (git blame not working) and actually adds
support for detecting git changes in a `.git` folder that's outside of
our path (and not even in the ancestor chain of our root path).

(While working on this we discovered that our `.gitignore` handling is
not 100% correct. For example: we do stop processing `.gitignore` files
once we found a `.git` repository and don't go further up the ancestors,
which is correct, but then we also don't take into account the
`excludesFile` that a user might have configured, see:
https://git-scm.com/docs/gitignore)


Closes https://github.com/zed-industries/zed/issues/19842
Closes https://github.com/zed-industries/zed/issues/4670

Release Notes:

- Added support for git worktrees. Zed can now open git worktrees and
the git status in them is correctly handled.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
2024-11-06 09:43:39 +01:00
..
blame.rs chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
commit.rs chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
diff.rs Pass Summary::Context to Item::summarize (#18510) 2024-09-29 10:30:48 -06:00
git.rs Make Git remote URL parsing more robust (#19924) 2024-10-29 16:19:05 -04:00
hosting_provider.rs Make Git remote URL parsing more robust (#19924) 2024-10-29 16:19:05 -04:00
remote.rs Make Git remote URL parsing more robust (#19924) 2024-10-29 16:19:05 -04:00
repository.rs git: Add support for opening git worktrees (#20164) 2024-11-06 09:43:39 +01:00
status.rs /auto (#16696) 2024-09-13 13:17:49 -04:00