forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Do resolve symlinks in getcwd()
#2449
Merged
Merged
Conversation
This file contains 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
As pointed out in git-for-windows#1676, the `git rev-parse --is-inside-work-tree` command currently fails when the current directory's path contains symbolic links. The underlying reason for this bug is that `getcwd()` is supposed to resolve symbolic links, but our `mingw_getcwd()` implementation did not. We do have all the building blocks for that, though: the `GetFinalPathByHandleW()` function will resolve symbolic links. However, we only called that function if `GetLongPathNameW()` failed, for historical reasons: the latter function was supported for a long time, but the former API function was introduced only with Windows Vista, and we used to support also Windows XP. With that support having been dropped, we are free to call the symbolic link-resolving function right away. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
to dscho/git
that referenced
this pull request
Jan 3, 2020
…ymlinks Do resolve symlinks in `getcwd()`
dscho
added a commit
to git-for-windows/build-extra
that referenced
this pull request
Jan 3, 2020
Git [now works properly](git-for-windows/git#2449) when inside a symlinked work tree. Signed-off-by: Johannes Schindelin <[email protected]>
dscho
added a commit
that referenced
this pull request
Jan 4, 2020
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Jan 4, 2020
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Jan 4, 2020
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 6, 2020
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 7, 2020
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 7, 2020
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 8, 2020
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 8, 2020
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 8, 2020
Do resolve symlinks in `getcwd()`
dscho
added a commit
to dscho/git
that referenced
this pull request
Jan 9, 2020
…ymlinks Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jan 9, 2020
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Jan 9, 2020
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 15, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 15, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 19, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 19, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 20, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 21, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 21, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 22, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 24, 2025
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Feb 25, 2025
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Feb 25, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 25, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 25, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 25, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
dscho
added a commit
to dscho/git
that referenced
this pull request
Feb 26, 2025
…ymlinks Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Feb 26, 2025
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Feb 27, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 28, 2025
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Feb 28, 2025
Do resolve symlinks in `getcwd()`
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.
This fixes the remaining part of #1676, where working inside a Git worktree inside a symlinked directory would not work.