Always use strings to represent paths over the wire
Previously, the protocol used a mix of strings and bytes without any consistency. When we go to multiple platforms, we won't be able to mix encodings of paths anyway. We don't know this is the right approach, but it at least makes things consistent and easy to read in the database, on the wire, etc. Really, we should be using entry ids etc to refer to entries on the wire anyway, but there's a chance this is the wrong decision. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
974ef967a3
commit
4b1dcf2d55
7 changed files with 32 additions and 35 deletions
|
@ -279,26 +279,26 @@ message UpdateWorktree {
|
|||
repeated uint64 removed_entries = 5;
|
||||
uint64 scan_id = 6;
|
||||
bool is_last_update = 7;
|
||||
bytes abs_path = 8;
|
||||
string abs_path = 8;
|
||||
}
|
||||
|
||||
message CreateProjectEntry {
|
||||
uint64 project_id = 1;
|
||||
uint64 worktree_id = 2;
|
||||
bytes path = 3;
|
||||
string path = 3;
|
||||
bool is_directory = 4;
|
||||
}
|
||||
|
||||
message RenameProjectEntry {
|
||||
uint64 project_id = 1;
|
||||
uint64 entry_id = 2;
|
||||
bytes new_path = 3;
|
||||
string new_path = 3;
|
||||
}
|
||||
|
||||
message CopyProjectEntry {
|
||||
uint64 project_id = 1;
|
||||
uint64 entry_id = 2;
|
||||
bytes new_path = 3;
|
||||
string new_path = 3;
|
||||
}
|
||||
|
||||
message DeleteProjectEntry {
|
||||
|
@ -884,7 +884,7 @@ message File {
|
|||
message Entry {
|
||||
uint64 id = 1;
|
||||
bool is_dir = 2;
|
||||
bytes path = 3;
|
||||
string path = 3;
|
||||
uint64 inode = 4;
|
||||
Timestamp mtime = 5;
|
||||
bool is_symlink = 6;
|
||||
|
@ -1068,7 +1068,7 @@ message WorktreeMetadata {
|
|||
uint64 id = 1;
|
||||
string root_name = 2;
|
||||
bool visible = 3;
|
||||
bytes abs_path = 4;
|
||||
string abs_path = 4;
|
||||
}
|
||||
|
||||
message UpdateDiffBase {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue