Commit Graph
43 Commits
Author SHA1 Message Date
白山風露 42a5081aff Use try_from_bytes for windows build (#7500)
Reduce windows build error.

Release Notes:

- N/A
2024-02-07 11:27:26 -05:00
Marshall Bowers 176f63e86e Add ability to copy a permalink to a line (#7119)
This PR adds the ability to copy the permalink to a line from within
Zed.

This functionality is available through the `editor: copy permalink to
line` action in the command palette:

<img width="589" alt="Screenshot 2024-01-30 at 7 07 46 PM"
src="https://github.com/zed-industries/zed/assets/1486634/332282cb-211f-4f16-9eb1-415bcfee9b7b">

Executing this action will create a permalink to the currently selected
line(s) and copy it to the clipboard.

Here is an example line:

```
https://github.com/maxdeviant/auk/blob/56c80e80112744740be1969c89fdd34db4be6f64/src/lib.rs#L25
```

Currently, both GitHub and GitLab are supported.

### Notes and known limitations

- In order to determine where to permalink to, we read the URL of the
`origin` remote in Git. This feature will not work if the `origin`
remote is not present.
- Attempting to permalink to a ref that is not pushed to the origin will
result in the link 404ing.
- Attempting to permalink when Git is in a dirty state may not generate
the right link.
- For instance, modifying a file (e.g., adding new lines) and grabbing a
permalink to it will result in incorrect line numbers.

Release Notes:

- Added the ability to copy a permalink to a line
([#6777](https://github.com/zed-industries/zed/issues/6777)).
- Available via the `editor: copy permalink to line` action in the
command palette.
2024-01-30 19:20:15 -05:00
Piotr Osiewicz 6c82380232 chore: Fix clippy::needless_borrow up to an editor 2024-01-21 15:03:24 +01:00
Mikayla 57400e9687 Fix typos detected by crate-ci/typos 2024-01-17 14:31:21 -08:00
Kirill Bulatov ce8cc50ae5 Remove async_trait from the only trait that allows it now 2023-12-28 23:45:30 +02:00
Max Brunsfeld 17925ed563 Remove unnecessary dependencies on client and rpc 2023-10-06 13:14:53 -07:00
Max Brunsfeld 8fff0b0ff8 Fix pathspec in staged_statuses
Enable non-literal matching so that directory paths match
all files contained within them.
2023-07-23 21:36:29 -07:00
Max Brunsfeld a3a9d024ba Fix filtering of staged statuses 2023-07-22 17:53:58 -07:00
Max Brunsfeld b338ffe8d8 Rely on git status for any paths not matching the git index 2023-07-22 17:47:36 -07:00
Max Brunsfeld 6c09782aa2 Optimize full file status via passing in known file mtime 2023-07-22 11:53:26 -07:00
Max Brunsfeld 51d311affd Compute unstaged git status separately, to take advantage of our cached file mtimes 2023-07-21 17:58:43 -07:00
Max Brunsfeld ff0864026e Only fetch statuses for changed paths 2023-07-21 17:08:31 -07:00
Max Brunsfeld 05b161118c Don't call git status when ignored files change 2023-07-21 17:05:42 -07:00
Max Brunsfeld 4bd415f2b6 Retrieve git statuses in one batch when scanning dirs 2023-07-21 13:50:54 -07:00
Max Brunsfeld b9e0074793 Perform only one git statuses call when reloading a git repo after it changes 2023-07-14 14:29:22 -07:00
Piotr Osiewicz cb24cb1ea5 vcs: Add 'create branch' button 2023-07-07 18:36:55 +02:00
Piotr Osiewicz 54fad5969f List recent branches 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 3027e4729a Add timestamps to branches 2023-06-30 14:05:55 +02:00
Piotr Osiewicz d8d0bdc479 WIP: git menu 2023-06-30 14:05:55 +02:00
Mikayla Maki c12bdc894a Silence not found errors 2023-06-05 15:19:59 -07:00
Mikayla Maki 9a13a2ba2c WIP: Add status bubbling to project panel 2023-06-05 12:53:04 -07:00
Mikayla Makiandmax 99a0e11e70 Abandoning stateful bubbling approach
co-authored-by: max <max@zed.dev>
2023-06-02 14:51:40 -07:00
Mikayla Maki 3768851799 WIP: Git statuses 2023-06-01 23:27:49 -07:00
Mikayla Maki 5e43dcaab8 WIP: Add stateful status bubbling to worktree 2023-06-01 16:51:34 -07:00
Mikayla MakiandJulia 22e4086658 WIP: Move statuses to be on their associated file entries in worktree
co-authored-by: Julia <julia@zed.dev>
2023-05-31 11:03:11 -07:00
Mikayla Maki 307dd2b83e Update proto names to reflect new status info 2023-05-15 16:20:01 -07:00
Mikayla Maki 1e4ab6cd75 Add index tracking to status 2023-05-15 16:20:01 -07:00
Mikayla MakiandNathan 6ef0f70528 Made the map seek target a publicly implementable interface
Integrated remove_range with the existing git code

co-authored-by: Nathan <nathan@zed.dev>
2023-05-12 08:37:32 -07:00
Mikayla Maki 5b2ee63f80 Added status trickle up 2023-05-11 12:01:42 -07:00
Mikayla Maki adfbbf21b2 fmt 2023-05-10 20:09:37 -07:00
Mikayla Maki fca3bb3b93 Add randomized test for git statuses 2023-05-10 19:21:27 -07:00
Mikayla Maki e20eaca595 Got basic replication working :) 2023-05-10 17:37:36 -07:00
Mikayla Maki 23a19d85b8 Fix bug in status detection when removing a directory 2023-05-10 17:37:36 -07:00
Mikayla Maki 0082d68d4a Revert "Convert git status calculation to use Entry IDs as the key instead of repo relative paths"
This reverts commit 728c6892c924ebeabb086e308ec4b5f56c4fd72a.
2023-05-10 17:37:36 -07:00
Mikayla Maki f935047ff2 Convert git status calculation to use Entry IDs as the key instead of repo relative paths 2023-05-10 17:37:36 -07:00
Mikayla Maki a58a33fc93 WIP: integrate status with collab 2023-05-10 17:37:36 -07:00
Mikayla Makiandpetros 67491632cb WIP: Track live entry status in repository
co-authored-by: petros <petros@zed.dev>
2023-05-10 17:37:36 -07:00
Mikayla Makiandpetros 7169f5c760 Add git status to the file system abstraction
co-authored-by: petros <petros@zed.dev>
2023-05-10 17:37:36 -07:00
Mikayla Maki c6d7ed33c2 Add smoke test for collaboration 2023-05-08 14:33:59 -07:00
Mikayla Maki 26afd592c5 Wire in the branch name 2023-05-08 14:33:58 -07:00
Mikayla MakiandNathan a58d3d8128 Add a data driven representation of the current git repository state to the worktree snapshots
WIP: Switch git repositories to use SumTrees

Co-authored-by: Nathan <nathan@zed.dev>
2023-05-08 14:33:58 -07:00
Mikayla Maki 6571555c4d Fix unwrap in git2 library causing panics in Zed 2023-03-16 13:06:23 -07:00
Mikayla Maki 0a8e2f6bb0 Moved fs to it's own crate, build failing due to cyclic dependency on rope 2022-10-11 13:03:36 -07:00