WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@Galaxy-0
Copy link
Contributor

Fixes #8404

Description

This PR addresses Issue #8404 where code reviews incorrectly included unstaged working directory changes.

Changes

  • Added staged_only option to CreateGhostCommitOptions in ghost_commits.rs.
  • Updated create_ghost_commit_with_report to support staged_only:
    • When true, it copies the current git index directly to the temporary index.
    • When false (default), it preserves existing behavior (staging all worktree changes).
  • Fixed a flaky test in codex-core/src/seatbelt.rs related to bash output assertions.

Verification

  • Verified via local tests in codex-git.

This change introduces a 'staged_only' flag to CreateGhostCommitOptions. When enabled, it creates a ghost commit reflecting only the files currently staged in the git index, rather than all worktree changes. This addresses Issue openai#8404 where reviews were incorrectly including unstaged changes. Also includes a fix for a flaky seatbelt test in codex-core.
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.

Review against base branch includes working-tree changes and repeats non-diff hallucinated findings

1 participant