-
Notifications
You must be signed in to change notification settings - Fork 898
Fixed normalized paths bug that prevented copying class in IDE. Issue 8497 #8499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
FolsomHunter
wants to merge
1
commit into
apache:master
Choose a base branch
from
FolsomHunter:dev-HSS-gitMoveTreeCommandSymLinkBugFix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fixed normalized paths bug that prevented copying class in IDE. Issue 8497 #8499
FolsomHunter
wants to merge
1
commit into
apache:master
from
FolsomHunter:dev-HSS-gitMoveTreeCommandSymLinkBugFix
Conversation
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
This is the exception it fixes:
|
98b4a6e
to
452a7f7
Compare
mbien
reviewed
May 22, 2025
ide/libs.git/src/org/netbeans/libs/git/jgit/commands/MoveTreeCommand.java
Outdated
Show resolved
Hide resolved
ide/libs.git/src/org/netbeans/libs/git/jgit/commands/MoveTreeCommand.java
Outdated
Show resolved
Hide resolved
… 8497. If both repo and project paths were symlinks or network drive paths, copying with refactoring caused exceptions to be thrown. Other actions may have resulted in the same. A normalized file path canNOT be passed into getIgnores because getIgnores creates and executes a StatusCommand. Executing the StatusCommand passes the repository and the source file. StatusCommand gets the repository path by calling repository.getWorkTree(), which returns a non-normalized path. If both the repository and the source file are referenced via a symlink or network drive, referencing file paths via normalizing and non-normaling causes file path mismatches. The normalized file path points to another location on the system, but repository.getWorkTree() will provide a non-normalized file path. Signed-off-by: Hunter Schoonover <hunter@skoonie.com>
452a7f7
to
15dbcee
Compare
@mbien I noticed that a build check failed. Is that something I need to figure out how to resolve or is that for you to resolve? |
You can run the unittests locally, check if the problem is reproducible. These seem to be real and related to the change:
This one is most probably flaky (from the name it checks garbadge collection and this is unstable by definition):
|
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.
If both repo and project paths were symlinks or network drive paths, copying with refactoring caused exceptions to be thrown. Other actions may have resulted in the same.
A normalized file path canNOT be passed into getIgnores because getIgnores creates and executes a StatusCommand. Executing the StatusCommand passes the repository and the source file. StatusCommand gets the repository path by calling repository.getWorkTree(), which returns a non-normalized path.
If both the repository and the source file are referenced via a symlink or network drive, referencing file paths via normalizing and non-normaling causes file path mismatches.
The normalized file path points to another location on the system, but repository.getWorkTree() will provide a non-normalized file path.
^Add meaningful description above
Click to collapse/expand PR instructions
By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
Please make sure (eg.
git log
) that all commits have a valid name and email address for you in the Author field.If you're a first time contributor, see the Contributing guidelines for more information.
If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
PR approval and merge checklist:
If this PR targets the delivery branch: don't merge. (full wiki article)