Skip to content

local review: correct the README and the dirty-tree warning - #744

Merged
rgushchin merged 2 commits into
sashiko-dev:mainfrom
ftabba:pr/readme-current-tree
Oct 27, 2026
Merged

rgushchin merged 2 commits into
sashiko-dev:mainfrom
ftabba:pr/readme-current-tree

Conversation

@ftabba

@ftabba ftabba commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Two messages misstate what a local review reads. The README states that it applies the patches in a temporary scratch clone, and the warning on a dirty working directory states that the reviewer might see the uncommitted changes. Neither happens: run_git_review runs the worker with current_tree set, so nothing is cloned or applied, and the review reads files through git, with HEAD standing for the commit under review.

The first commit corrects the README. The second keeps the warning and its prompt, and makes the warning state that uncommitted changes aren't reviewed.

@sashiko-bot

sashiko-bot Bot commented Oct 25, 2026

Copy link
Copy Markdown

Sashiko review

Commit 1/1 — c2255db8 docs: local review reads the checked-out tree

  • [MEDIUM] In README.md (Quick Start), the documentation inaccurately states
    that local review reads the checked-out working tree and requires checking
    out the last commit of the range and leaving the working tree unchanged. In
    src/local_review.rs (run_git_review and review_single_patch),
    src/worker/prefetch.rs (prefetch_context), src/toolbox/git_read_files.rs
    (GitReadFilesTool::read_single_file), and src/worker/location_resolver.rs
    (read_file_content), setting current_tree only skips temporary worktree
    creation and patch application while pinning virtual HEAD to each reviewed
    commit SHA and reading committed blobs directly from the Git object
    database rather than the physical working tree.

Full review and stage logs on sashiko.sashiko.dev

The README states that local review applies the patches in a temporary
scratch clone. run_git_review runs the worker with current_tree set, so
nothing is cloned or applied: the review reads files through git, with
HEAD standing for the commit under review, and leaves the working tree
alone.

Describe what the review does instead.

Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
sashiko review warns on a dirty working directory that the reviewer
might see the uncommitted changes. It doesn't: the review reads files
through git, with HEAD standing for the commit under review, and the
prefetch has read the target commit rather than the working files
since e059a45 ("prefetch: read review context from the target
commit").

Keep the warning and the prompt, since someone who meant to review
uncommitted work can still stop and commit it, and make the warning
state that the uncommitted changes are not reviewed.

Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
@ftabba
ftabba force-pushed the pr/readme-current-tree branch from c2255db to 06c33b3 Compare October 25, 2026 16:28
@ftabba ftabba changed the title docs: local review reads the checked-out tree local review: correct the README and the dirty-tree warning Oct 25, 2026
@ftabba

ftabba commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

I wrote that the review reads the checked-out tree, but it reads files through git, with HEAD standing for the commit under review. Fixed in the new head, which also corrects the dirty-tree warning: it stated that the review might see uncommitted changes.

@sashiko-bot

sashiko-bot Bot commented Oct 25, 2026

Copy link
Copy Markdown

Sashiko review — v2

✓ No issues found across 2 commits.

Full review log on sashiko.sashiko.dev

@rgushchin
rgushchin merged commit bdd0d9f into sashiko-dev:main Oct 27, 2026
1 check passed
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.

2 participants