Address relative worktree review comments#2623
Merged
Merged
Conversation
…`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.
9e8094e to
3cb24ed
Compare
There was a problem hiding this comment.
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 expectedpathsemantics.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Tasks
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
gix_discover::path::from_plain_file()docs to say it trims trailing whitespace and rejects empty or whitespace-only files.from_plain_file_relative_to_file()path-file semantics for single-component relative paths, matchingPath::parent()behavior.Validation
cargo fmt --all --checkcargo test -p gix-discover --test discover path::from_plain_filecargo test -p gix-discover --test discover worktree_with_relative_linking_filescargo test -p gix --test gix linked_worktree_proxy_basegit diff --checkcodex review --commit 9e8094ea1f64ddb3de2441b55d1e6e7ba60f5f49