Repository navigation
Conversation
The Changes panel diffed every untracked path with `git diff --no-index /dev/null <path>`. git cannot compare /dev/null with a directory, so an untracked symlink to a directory, or a nested repository (which status lists as `dir/`), failed with "Could not access '<path>/null'". An untracked symlink to a directory now gets the same new-link diff git prints for any other link: one added line holding the target. A nested repository shows "No textual diff." and its row is named after its directory. Every untracked link counts as one added line in the list. Discarding a link removes only the link, and discarding a nested repository never deletes it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Changes panel failed to open two kinds of untracked path with
Could not access '<path>/null':git statuslists asdir/. It now shows "No textual diff.", and its row is named after the directory and grouped under its parent.Every untracked link counts as one added line in the file list. Discarding a link removes only the link, and discarding a nested repository never deletes it.
Cause
Every untracked path was diffed with
git diff --no-index /dev/null <path>. git can't compare/dev/nullwith a directory, and it sees one both through a symlink to a directory and at a nested repository.untrackedDiff()inapps/desktop/src/main/engine/git.tsnow handles those two cases. Every other untracked path still goes through git's own diff.Tests
apps/desktop/test/git.test.tsgets 5 new tests:apps/desktop/e2e/review.spec.tsgets one new end-to-end test covering both cases in the panel.Local results, on an export of
mainat538d357with this change applied:git.test.ts: 25 passed, 0 failed.pnpm --filter @modex/desktop typecheckis clean.mainwithout this change: 18 of 71 fail both with and without the patch, run twice. They come from the sandbox the run was in, not from this change.Provenance
This work was left uncommitted in the
fix-changes-symlink-diffworktree, which is still claimed bysession:fix-changes-symlink-diff. That worktree was copied from and not changed. This PR is the same diff applied to currentmain. It adds one fix, moving theChangesPaneldoc comment back ontoChangesPanelafter the newrowPathhelper had been inserted between them, and it places the status line in the section wheremainnow keeps unreleased changes.🤖 Generated with Claude Code