Skip to content

Address relative worktree review comments#2623

Merged
Sebastian Thiel (Byron) merged 1 commit into
mainfrom
followup-2599
May 27, 2026
Merged

Address relative worktree review comments#2623
Sebastian Thiel (Byron) merged 1 commit into
mainfrom
followup-2599

Conversation

@Byron
Copy link
Copy Markdown
Member

@Byron Sebastian Thiel (Byron) commented May 26, 2026

Tasks

  • refackiew

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Summary

Follow up on unresolved review comments from #2599 (review) after PR #2599 was merged.

Changes

  • Update gix_discover::path::from_plain_file() docs to say it trims trailing whitespace and rejects empty or whitespace-only files.
  • Document from_plain_file_relative_to_file() path-file semantics for single-component relative paths, matching Path::parent() behavior.
  • Make both relative-worktree fixture scripts independent of global Git identity configuration by setting a fixture commit identity.
  • Regenerate the archived fixtures for those script changes.

Validation

  • cargo fmt --all --check
  • cargo test -p gix-discover --test discover path::from_plain_file
  • cargo test -p gix-discover --test discover worktree_with_relative_linking_files
  • cargo test -p gix --test gix linked_worktree_proxy_base
  • git diff --check
  • codex review --commit 9e8094ea1f64ddb3de2441b55d1e6e7ba60f5f49

…`from_plain_file`

Follow up on review comments from PR #2599 after the PR was merged.

Update plain-path docs to describe trailing-whitespace trimming, invalid empty
path files, and relative path-file semantics for single-component relative
paths.
@Byron Sebastian Thiel (Byron) marked this pull request as ready for review May 27, 2026 00:51
Copilot AI review requested due to automatic review settings May 27, 2026 00:51
Copy link
Copy Markdown

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

Follow-up to prior review feedback around linked-worktree “plain path” file parsing and relative-path resolution in gix-discover, clarifying semantics and tightening behavior for invalid inputs.

Changes:

  • Update from_plain_file() documentation to reflect trailing whitespace trimming and rejection of empty/whitespace-only files.
  • Adjust from_plain_file_relative_to_file() to return an error when asked to resolve a relative path but the path-file has no parent directory, and document expected path semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread gix-discover/src/path.rs
@Byron Sebastian Thiel (Byron) merged commit 1d2d3b4 into main May 27, 2026
33 checks passed
@Byron Sebastian Thiel (Byron) deleted the followup-2599 branch May 27, 2026 01:22
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