Skip to content

Conversation

@Byron
Copy link
Collaborator

@Byron Byron commented Jan 22, 2026

Right now, when a file that shows up in the status check can't be diffed, the whole operation fails.

It turns out that on Windows, there are files that are locked and can't be read, so we should avoid failing in this case.

Unfortunately the exact error code is unknown, but maybe we can make it a general feature and log the ignored files for now.

Related to #5407

Edit:

Actually this needs https://github.com/GitoxideLabs/gitoxide/blob/5c1bd0387f98eee37265a42ba4b6624c783c9a71/gix-status/src/index_as_worktree_with_renames/mod.rs#L530 to be altered to be able to survive not being able to read the file. So nothing to be done here.

This is now fixed, probably, with a fix in gix. If it still fails, I think Windows might come up with different error codes, as for now I constrain it to specific issues.

Tasks

  • fix this in gix
  • use it here (assuming it will work as actual diffs are already fallible)

@vercel
Copy link

vercel bot commented Jan 22, 2026

@Byron is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the rust Pull requests that update Rust code label Jan 22, 2026
@Byron Byron marked this pull request as ready for review January 22, 2026 13:58
Copilot AI review requested due to automatic review settings January 22, 2026 13:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the tracing instrumentation for the project_files_change function to skip the repo parameter in trace output. According to the PR description, the originally intended fix for handling files that can't be diffed (particularly on Windows with locked files) actually needs to be implemented in the gitoxide library itself, not in this codebase.

Changes:

  • Added repo to the skip list in the #[instrument] macro for project_files_change function

@Byron Byron changed the title Continue worktree-changes even if individual files can't be diffed. (#5407) Update gix to latest version to include gix status fix to not fail if worktree files can't be read. Jan 22, 2026
@Byron Byron enabled auto-merge January 22, 2026 18:59
@Byron
Copy link
Collaborator Author

Byron commented Jan 22, 2026

@krlvi The codeowners trigger is because I had to update gix to the latest release, which happened today.

Copy link
Contributor

@Caleb-T-Owens Caleb-T-Owens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…itbutlerapp#5407)

Right now, when a file that shows up in the status check can't be diffed,
the whole operation fails.

It turns out that on Windows, there are files that are locked and can't be
read, so we should avoid failing in this case.

Unfortunately the exact error code is unknown, but maybe we can make it
a general feature and log the ignored files for now.

Actually, this is an issue here:

https://github.com/GitoxideLabs/gitoxide/blob/5c1bd0387f98eee37265a42ba4b6624c783c9a71/gix-status/src/index_as_worktree_with_renames/mod.rs#L530

So the status fails, and a `gix` fix is needed for this.
Copilot AI review requested due to automatic review settings January 22, 2026 19:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.

@Byron Byron merged commit 5c2eca4 into gitbutlerapp:master Jan 22, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants