Represent git statuses more faithfully (#23082)
First, parse the output of `git status --porcelain=v1` into a representation that can handle the full "grammar" and doesn't lose information. Second, as part of pushing this throughout the codebase, expand the use of the existing `GitSummary` type to all the places where status propagation is in play (i.e., anywhere we're dealing with a mix of files and directories), and get rid of the previous `GitSummary -> GitFileStatus` conversion. - [x] Synchronize new representation over collab - [x] Update zed.proto - [x] Update DB models - [x] Update `GitSummary` and summarization for the new `FileStatus` - [x] Fix all tests - [x] worktree - [x] collab - [x] Clean up `FILE_*` constants - [x] New collab tests to exercise syncing of complex statuses - [x] Run it locally and make sure it looks good Release Notes: - N/A --------- Co-authored-by: Mikayla <mikayla@zed.dev> Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
parent
224f3d4746
commit
a41d72ee81
24 changed files with 1015 additions and 552 deletions
|
@ -21,6 +21,7 @@ OPTIONS
|
|||
-2, -3, -4, ... Spawn multiple Zed instances, with their windows tiled.
|
||||
--top Arrange the Zed windows so they take up the top half of the screen.
|
||||
--stable Use stable Zed release installed on local machine for all instances (except for the first one).
|
||||
--preview Like --stable, but uses the locally-installed preview release instead.
|
||||
`.trim();
|
||||
|
||||
const { spawn, execSync, execFileSync } = require("child_process");
|
||||
|
@ -48,6 +49,7 @@ let instanceCount = 1;
|
|||
let isReleaseMode = false;
|
||||
let isTop = false;
|
||||
let othersOnStable = false;
|
||||
let othersOnPreview = false;
|
||||
let isStateful = false;
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
@ -68,6 +70,8 @@ while (args.length > 0) {
|
|||
process.exit(0);
|
||||
} else if (arg === "--stable") {
|
||||
othersOnStable = true;
|
||||
} else if (arg === "--preview") {
|
||||
othersOnPreview = true;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -172,6 +176,8 @@ setTimeout(() => {
|
|||
let binaryPath = zedBinary;
|
||||
if (i != 0 && othersOnStable) {
|
||||
binaryPath = "/Applications/Zed.app/Contents/MacOS/zed";
|
||||
} else if (i != 0 && othersOnPreview) {
|
||||
binaryPath = "/Applications/Zed Preview.app/Contents/MacOS/zed";
|
||||
}
|
||||
spawn(binaryPath, i == 0 ? args : [], {
|
||||
stdio: "inherit",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue