Commit graph

6004 commits

Author SHA1 Message Date
Mikayla Maki
52dbf2f9b8 add proto stuff 2022-10-02 18:01:37 -07:00
Mikayla Maki
5769cdc354 made git diff rendering respect line wrap 2022-10-02 18:00:13 -07:00
Julia
7f84abaf13 Increment protocol version again for previous commit 2022-10-02 14:11:35 -04:00
Mikayla Maki
512f817e2f Added proto messages for updating the head text 2022-10-01 18:18:35 -07:00
Mikayla Maki
8c24c858c9 Touched up comments 2022-09-30 17:36:22 -07:00
Mikayla Maki
a1299d9b68 Fixed 1 test 2022-09-30 17:34:14 -07:00
Mikayla Maki
af0974264c Refactored git repository code to seperate out repository entry tracking data and git2 mocking code.
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Julia <julia@zed.dev>
2022-09-30 17:33:34 -07:00
Julia
c95646a298 WIP Start refactoring separation of concerns for repo metadata
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-30 18:25:25 -04:00
Julia
42b7820dbb Perform git diff on remote buffer open 2022-09-30 18:05:09 -04:00
Julia
ce7f6dd082 Start a test for remote git data updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-30 15:51:32 -04:00
Julia
6540936970 Fix some panics in tests 2022-09-30 13:51:54 -04:00
Julia
1c5d15b85e Use sumtree instead of iterator linear search for diff hunks in range
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-30 13:32:54 -04:00
Julia
bce25918a0 Fix test build 2022-09-30 11:13:22 -04:00
Julia
fcf11b1181 Bump protocol version to be ahead of main 2022-09-29 13:16:02 -04:00
Julia
e865b85d9c Track index instead of head for diffs 2022-09-29 13:16:02 -04:00
Mikayla Maki
9fe6a5e83e made git stuff slightly more themable 2022-09-29 13:16:02 -04:00
Nate Butler
b395fbb3f2 wip 2022-09-29 13:16:02 -04:00
Nate Butler
8a2430090b WIP Git gutter styling 2022-09-29 13:16:02 -04:00
Mikayla Maki
113d3b88d0 Added test, and fix, for changed_repos method on LocalWorktree 2022-09-29 13:16:02 -04:00
Julia
f7714a25d1 Don't pretend this is async 2022-09-29 13:16:02 -04:00
Mikayla Maki
71b2126eca WIP, re-doing fs and fake git repos 2022-09-29 13:16:02 -04:00
Julia
d5fd531743 Move git related things into specialized git crate
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
bf3b3da6ed Build again 2022-09-29 13:16:02 -04:00
Julia
7e5d49487b WIP Notifying buffers of head text change
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
759b7f1e07 Update repo scan id when files under dot git dir events
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
d2b18790a0 Remove git repos from worktree when deleted on storage
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
4251e0f5f1 Find repos under worktree & return correct results for repo queries
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Mikayla Maki
c8e63d76a4 Get the test to failing,,, correctly 2022-09-29 13:16:02 -04:00
Mikayla Maki
6ac9308a03 Added git repository type infrastructure and moved git file system stuff into fs abstraction so we can test without touching the file system. Co-Authored-By: kay@zed.dev 2022-09-29 13:16:02 -04:00
Mikayla Maki
0d1b2a7e46 WIP - max & mikayla working on tests 2022-09-29 13:16:02 -04:00
Julia
bb8798a844 WIP pls amend me
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
8d2de1074b Pull git indicator colors out of theme
Co-Authored-By: Kay Simmons <kay@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
632f47930f Utilize initial file contents as head text by default
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
a679557e40 Avoid racing git diffs & allow for "as fast as possible" diff updating
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
b18dd8fcff Fully qualify outside git-related code when a diff is a git diff 2022-09-29 13:16:02 -04:00
Julia
8edee9b2a8 Async-ify head text loading 2022-09-29 13:16:02 -04:00
Julia
6633c0b328 Perform initial file load git diff async 2022-09-29 13:16:02 -04:00
Julia
6825b6077a Properly invalidate when async git diff completes 2022-09-29 13:16:02 -04:00
Julia
9c82954877 Changed diffs to be async and dropped git delay 2022-09-29 13:16:02 -04:00
Julia
c4da8c46f7 Disable unnecessary libgit2 cargo features
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-29 13:16:02 -04:00
Julia
b9d84df127 Track buffer row divergence while iterating through diff lines
This allows for offsetting head row index of deleted lines to normalize
into buffer row space
2022-09-29 13:16:02 -04:00
Julia
446bf88655 Use row range while building buffer range during diff line iteration 2022-09-29 13:16:02 -04:00
Julia
03b6f3e0bf Reorganize for for purely file level invalidation 2022-09-29 13:16:02 -04:00
Julia
e72e132ce2 Clear out commented code & once again perform full file diff on update 2022-09-29 13:16:02 -04:00
Julia
c1249a3d84 Handle deletions more robustly and correctly 2022-09-29 13:16:02 -04:00
Julia
96917a8007 Small clean 2022-09-29 13:16:02 -04:00
Julia
2f7283fd13 buffer_divergence doesn't seem to be a concept that needs to be tracked 2022-09-29 13:16:02 -04:00
Julia
e0ea932fa7 Checkpoint preparing for a more organized approach to incremental diff 2022-09-29 13:16:02 -04:00
Julia
4b2040a7ca Move diff logic back into BufferDiff::update 2022-09-29 13:16:02 -04:00
Julia
a2e8fc79d9 Switch head range from row range to byte offset range
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-09-29 13:16:02 -04:00