glassbox 0.11.1-beta.1 → 0.12.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -5
- package/dist/cli-difftool.js +14797 -32
- package/dist/cli.js +555 -162
- package/dist/client/app.global.js +18 -18
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -284,19 +284,24 @@ If you'd rather wire it up by hand, the equivalent config is:
|
|
|
284
284
|
|
|
285
285
|
```bash
|
|
286
286
|
git config --global diff.tool glassbox
|
|
287
|
-
git config --global difftool.glassbox.cmd 'glassbox-difftool "$LOCAL" "$REMOTE"'
|
|
287
|
+
git config --global difftool.glassbox.cmd 'glassbox-difftool "$LOCAL" "$REMOTE" "$MERGED"'
|
|
288
288
|
git config --global difftool.prompt false
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
Then:
|
|
291
|
+
Then either:
|
|
292
292
|
|
|
293
293
|
```bash
|
|
294
|
-
git difftool --dir-diff HEAD~1 HEAD
|
|
294
|
+
git difftool --dir-diff HEAD~1 HEAD # whole change set in one review (recommended)
|
|
295
|
+
git difftool HEAD~1 HEAD # step through changed files one at a time
|
|
295
296
|
```
|
|
296
297
|
|
|
297
|
-
**
|
|
298
|
+
**Both modes open the whole change set as a single review.** With `--dir-diff`, git hands Glassbox both snapshot directories at once. **Per-file mode** (without `--dir-diff`) gets you the same single-session result: git invokes `glassbox-difftool` once per changed file, and the wrapper forwards each file to one long-lived Glassbox server, so every file accumulates into **one** review rather than one tab per file. git steps through the files with **no Ctrl-C between them**, and the sidebar grows live as each arrives. Each file is labeled with its repo-relative path.
|
|
298
299
|
|
|
299
|
-
|
|
300
|
+
When you're finished, click **Done** in the review (a difftool session shows this instead of the normal completion flow) — the `git difftool` command returns to your prompt cleanly, no Ctrl-C needed. Closing the browser tab ends the session too.
|
|
301
|
+
|
|
302
|
+
**Desktop vs browser:** in a browser (npm) install the accumulating model above applies. If the desktop app is installed, `--dir-diff` opens the whole change set in one Glassbox window (matching what `glassbox --commit` does from the same folder) on macOS, Linux, and Windows; desktop per-file mode currently opens one window per file, so `--dir-diff` is the recommended desktop invocation.
|
|
303
|
+
|
|
304
|
+
**Under the hood:** `git difftool --dir-diff` materializes its two snapshot directories asymmetrically — the right side is symlinks pointing into your working tree, which trips up plain `git diff --no-index`. `glassbox-difftool` dereferences those symlinks into a temp tree before handing the dirs to `glassbox --diff`, then cleans up when the session ends. In per-file mode the wrapper reads each file's content before it returns (git deletes the temp files the instant the tool exits) and POSTs it to the accumulating server; the last file holds the connection open so `git difftool` stays attached until you click Done. Without the wrapper you'd see every modified file show up as a "deleted + added" pair instead of a modified entry, and per-file mode would hang waiting for a manual Ctrl-C between files.
|
|
300
305
|
|
|
301
306
|
**Alternative: skip git difftool entirely.** Glassbox's native ref-aware modes already cover the workflows `git difftool` is for and produce cleaner diffs (real `git diff`, not `--no-index`):
|
|
302
307
|
|