forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
mingw: special-case index entries for symlinks with buggy size #2666
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
Merged
dscho
merged 1 commit into
git-for-windows:master
from
dscho:nicer-upgrade-path-for-#2637
Jun 6, 2020
Merged
mingw: special-case index entries for symlinks with buggy size #2666
dscho
merged 1 commit into
git-for-windows:master
from
dscho:nicer-upgrade-path-for-#2637
Jun 6, 2020
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
In git-for-windows#2637, we fixed a bug where symbolic links' target path sizes were recorded incorrectly in the index. The downside of this fix was that every user with tracked symbolic links in their checkouts would see them as modified in `git status`, but not in `git diff`, and only a `git add <path>` (or `git add -u`) would "fix" this. Let's do better than that: we can detect that situation and simply pretend that a symbolic link with a known bad size (or a size that just happens to be that bad size, a _very_ unlikely scenario because it would overflow our buffers due to the trailing NUL byte) means that it needs to be re-checked as if we had just checked it out. Signed-off-by: Johannes Schindelin <[email protected]>
This looks reasonable to me. My apologies for not looking at this issue earlier, but I have had to work on a problem in my own software. |
Thank you!
No worries at all! |
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 6, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 6, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 6, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 8, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 8, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 8, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 8, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 9, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 9, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 9, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 9, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 9, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Jun 10, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 11, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Jun 11, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 12, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 12, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 16, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 16, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 16, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 16, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Jun 18, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 25, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 25, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 27, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 27, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 28, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 28, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 28, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Sep 29, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Sep 29, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Sep 29, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Sep 29, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 29, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Sep 29, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Sep 30, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 1, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 2, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 2, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 2, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 2, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 2, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 2, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 2, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 4, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 4, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 4, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 5, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 5, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 5, 2020
mingw: special-case index entries for symlinks with buggy size
git-for-windows-ci
pushed a commit
that referenced
this pull request
Oct 5, 2020
mingw: special-case index entries for symlinks with buggy size
dscho
added a commit
that referenced
this pull request
Oct 6, 2020
mingw: special-case index entries for symlinks with buggy size
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.
Let's not mark symbolic links as modified always when upgrading to v2.27.0: we can detect that situation and simply
pretend that a symbolic link with a known bad size was just checked it out, and therefore needs to be re-checked.
This will help people who upgrade from pre-v2.27.0 versions to post-v2.27.0 versions (but unfortunately not when upgrading to v2.27.0).
Cc: @billziss-gh