Skip to content

git: text PATCH between index and worktree - #25

Closed
mgasner wants to merge 1 commit into
fix/git-status-snapshotfrom
fix/git-diff-index-worktree
Closed

mgasner wants to merge 1 commit into
fix/git-status-snapshotfrom
fix/git-diff-index-worktree

Conversation

@mgasner

@mgasner mgasner commented Sep 28, 2026

Copy link
Copy Markdown

Stacked on #24; the diff shows only this change.

yas git diff -p between the index and the working tree failed with Unsupported. A text PATCH needs a content object, and neither INDEX nor WORKTREE has one.

A patch between two mutable endpoints (INDEX, WORKTREE, EMPTY) now carries the null object ID, and docs/design/git.md documents this. yas git diff -p with no revisions prints a unified diff of the working tree against the index.

Testing

  • Added an INDEX→WORKTREE PATCH_TEXT case to typed_queries_cover_repository_reads_without_exposing_legacy_packets.
  • Checked by hand.

View in Indent
Tag @indent to continue the conversation here.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Coverage

Crate Lines Functions Regions
alacritty-driver 85.6% (1081/1263) 89.4% (84/94) 89.3% (1746/1955)
browser 25.5% (309/1212) 30.4% (34/112) 27.7% (605/2183)
cli 34.0% (6711/19741) 36.1% (636/1760) 35.1% (9967/28387)
client 68.3% (5800/8497) 68.5% (708/1033) 66.4% (7526/11331)
composite-transport 96.3% (526/546) 98.4% (60/61) 96.2% (884/919)
compositor 55.0% (11457/20820) 66.2% (837/1265) 54.9% (15872/28909)
desktop 78.4% (4460/5691) 71.6% (393/549) 75.1% (6211/8267)
edge 63.1% (800/1268) 50.9% (82/161) 58.0% (1043/1799)
fonts 77.3% (1257/1626) 82.7% (129/156) 78.9% (2424/3071)
fssync 86.0% (1610/1872) 85.8% (182/212) 87.1% (2834/3255)
git 73.1% (4636/6344) 70.5% (347/492) 70.3% (6611/9407)
guest 67.3% (6829/10148) 67.0% (488/728) 66.6% (8935/13416)
lsp 78.7% (3573/4542) 80.8% (336/416) 76.7% (5408/7054)
proxy 63.1% (1902/3012) 56.3% (184/327) 63.4% (2931/4626)
runtime-dir 93.6% (117/125) 100.0% (14/14) 94.8% (218/230)
sd-notify 73.9% (68/92) 100.0% (6/6) 83.2% (109/131)
server 71.5% (86232/120636) 74.1% (6259/8447) 69.5% (115546/166368)
ssh 67.0% (706/1054) 75.9% (85/112) 66.9% (1101/1645)
terminal-model 49.9% (314/629) 62.3% (38/61) 50.3% (505/1004)
uplink 94.2% (582/618) 92.6% (50/54) 93.1% (1062/1141)
webrtc-forwarder 33.6% (1321/3932) 44.9% (146/325) 36.0% (2279/6336)
webserver 80.7% (1490/1846) 81.1% (193/238) 83.2% (2551/3067)
website 35.1% (355/1012) 34.4% (53/154) 35.8% (607/1694)
xtask 0.0% (0/5149) 0.0% (0/131) 0.0% (0/9157)
yas 89.0% (28039/31522) 94.1% (2152/2286) 84.1% (44039/52388)
Total 67.2% (170175/253197) 70.3% (13496/19194) 65.5% (241014/367740)

@indent
indent Bot force-pushed the fix/git-diff-index-worktree branch from 4301d9c to e715560 Compare October 14, 2026 19:08
@indent
indent Bot force-pushed the fix/git-status-snapshot branch 2 times, most recently from 61b615c to af48588 Compare October 14, 2026 19:32
@indent
indent Bot force-pushed the fix/git-diff-index-worktree branch from e715560 to b5a47b0 Compare October 14, 2026 19:32
A PATCH_TEXT answer needs a content object and neither INDEX nor WORKTREE
names one, so `yas git diff -p` failed with Unsupported. Use the null
object ID for patches between two mutable endpoints.
@indent
indent Bot force-pushed the fix/git-status-snapshot branch from af48588 to 7148fa7 Compare October 15, 2026 01:43
@indent
indent Bot force-pushed the fix/git-diff-index-worktree branch from b5a47b0 to 9009342 Compare October 15, 2026 01:43
@indent indent Bot closed this Oct 15, 2026
@indent
indent Bot deleted the fix/git-diff-index-worktree branch October 15, 2026 13:07
pcarrier pushed a commit to yas-run/yas that referenced this pull request Oct 15, 2026
Stacked on #42. Please review only the top commit, "git: text PATCH between index and worktree".

`yas git diff -p` between the index and the worktree used to fail with Unsupported. A patch between mutable endpoints now carries the null object ID. `docs/design/git.md` documents this.

Fork PR with the isolated diff: indent-com#25.

[![View in Indent](https://assets.indent.com/view-in-indent.svg)](https://app.indent.com/c/01a0db15-330c-717e-9ec3-032c80770b1c)
Tag `@indent` to continue the conversation here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant