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 <johannes.schindelin@gmx.de>
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 <johannes.schindelin@gmx.de>
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()`
dscho
added a commit
that referenced
this pull request
Oct 20, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Oct 20, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Oct 21, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 21, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 21, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 22, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 22, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 22, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 22, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 22, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 22, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Oct 23, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 25, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 25, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 25, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 30, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Nov 1, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Nov 6, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
to dscho/git
that referenced
this pull request
Nov 12, 2024
…ymlinks Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Nov 22, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Nov 22, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Nov 22, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Nov 22, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
that referenced
this pull request
Nov 22, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Nov 25, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Nov 25, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Nov 25, 2024
Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Nov 25, 2024
Do resolve symlinks in `getcwd()`
dscho
added a commit
to dscho/git
that referenced
this pull request
Nov 25, 2024
…ymlinks Do resolve symlinks in `getcwd()`
git-for-windows-ci
pushed a commit
that referenced
this pull request
Nov 25, 2024
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.