Skip to content
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

As of 2.27.0, all symlinks have modifications after stash pop #2653

Closed
Tragetaschen opened this issue Jun 2, 2020 · 14 comments · Fixed by #2673
Closed

As of 2.27.0, all symlinks have modifications after stash pop #2653

Tragetaschen opened this issue Jun 2, 2020 · 14 comments · Fixed by #2673
Milestone

Comments

@Tragetaschen
Copy link

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
git version 2.27.0.windows.1
cpu: x86_64
built from commit: 907ab1011dce9112700498e034b974ba60f8b407
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Microsoft Windows [Version 10.0.18363.836]
(c) 2019 Microsoft Corporation. All rights reserved.
  • What options did you set as part of the installation? Or did you choose the
    defaults?
Editor Option: VIM
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
Enable Pseudo Console Support: Disabled

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
    Windows Terminal (Preview) running PowerShell. I'm explicitly not running git from WSL (ever)

  • What commands did you run to trigger this issue?

> git stash
> git stash pop
  • What did you expect to occur after running these commands?
    The number of modified files before and after the commands should be the same.

  • What actually happened instead?
    I have read the release notes of 2.27.0 regarding the symlink behavior. I had the modified symlink files and ran git add -u on them. However, after stash and pop, all symlinks are back to the modified state even though they were not before.

Related: #2637
CC @billziss-gh

@Tragetaschen
Copy link
Author

Steps to reproduce in an empty folder within a PowerShell prompt:

> git init
Initialized empty Git repository in …/.git/
> echo "a" > a.txt
> cmd
Microsoft Windows [Version 10.0.18363.836]
(c) 2019 Microsoft Corporation. All rights reserved.


>mklink b.txt a.txt
symbolic link created for b.txt <<===>> a.txt
 Volume in drive C is OS
 Volume Serial Number is …

 Directory of …

02.06.2020  14:27    <DIR>          .
02.06.2020  14:27    <DIR>          ..
02.06.2020  14:27    <SYMLINK>      b.txt [a.txt]
               2 Dir(s)  171.432.267.776 bytes free

>exit
> dir


    Directory: …


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       02.06.2020     14:27              8 a.txt
-a---l       02.06.2020     14:27              0 b.txt


> git add .
> git commit -m 'Commit'
[master (root-commit) 7761e65] Commit
 2 files changed, 1 insertion(+)
 create mode 100644 a.txt
 create mode 120000 b.txt
> echo "a" >> a.txt
> git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   a.txt

no changes added to commit (use "git add" and/or "git commit -a")
> git stash
Saved working directory and index state WIP on master: 7761e65 Commit
> git stash pop
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   a.txt
        modified:   b.txt

no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (a10b62bae9d511cb63c13a103f28707a850da436)

@Tragetaschen
Copy link
Author

I'm confused:

  • git gui does not show the modified status for the symlinks
  • git status on the command shows the modified status
  • Visual Studio's "Changes" tab in the Team Explorer shows the modified status

What's different in Git Gui?

@dscho
Copy link
Member

dscho commented Jun 3, 2020

What's different in Git Gui?

I guess that Git GUI parses the output of git diff, and that command does not report any changes.

@Tragetaschen
Copy link
Author

Now things get weird. I'm in a second repository that largely resembles same symlink structure, but I never ran git add -u (if that matters). Here, the situation regarding the modified state is exactly the opposite to the first repository:

  • git status on the command line shows no modified status
  • Visual Studio's "Changes" tab in the Team Explorer shows no modified status
  • git gui does show the modified status for the symlinks, but when selecting the file in "Unstaged Changes", a dialog pops up:
    image

git diff on the command line does not show anything for the symlinks.

@dscho
Copy link
Member

dscho commented Jun 7, 2020

I'm on my phone right now, so I cannot test: could you try again after running git config core.fscache false?

@orgads
Copy link

orgads commented Jun 7, 2020

I have the same situation here. Every time I run git reset --hard (or merge, or other operations), all the symbolic links appear as modified, and only git add . helps.

I just checked setting core.fscache to false, and it solved the issue.

@mrsvk
Copy link

mrsvk commented Jun 7, 2020

I see the same issue too - and it also happens when freshly cloning a repository containing symbolic links. My team is reverting to a prior version to avoid the issue for now.

@orgads
Copy link

orgads commented Jun 7, 2020

Bisected to 2f55cc4 (obviously), and it is not fixed by f18046e6ae891fbb39087ef5386a46417e7b9b42.

dscho added a commit to dscho/git that referenced this issue Jun 7, 2020
In git-for-windows#2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes git-for-windows#2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member

dscho commented Jun 7, 2020

Bisected to 2f55cc4 (obviously), and it is not fixed by f18046e.

Right.

I think I have a correct and complete fix in #2673. @orgads would you mind testing it?

@dscho
Copy link
Member

dscho commented Jun 7, 2020

@Tragetaschen @mrsvk could I ask you to test the installer and/or portable Git generated from this PR? They can be found here: https://dev.azure.com/git-for-windows/git/_build/results?buildId=57380&view=artifacts&type=publishedArtifacts

@Tragetaschen
Copy link
Author

Will do first thing tomorrow

@mrsvk
Copy link

mrsvk commented Jun 7, 2020

@dscho I did the same simple test case I had done previously (git clone -> git status). The new build results in the expected clean status, instead of flagging every symlink. This looks to have resolved the issue for me - thank you.

@orgads
Copy link

orgads commented Jun 8, 2020

Tested. It works for me. Thank you!

@dscho dscho added this to the Next release milestone Jun 8, 2020
git-for-windows-ci pushed a commit that referenced this issue Jun 8, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Jun 8, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Jun 8, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Jun 8, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@Tragetaschen
Copy link
Author

I tested it in both my repositories and they behave normally now

dscho added a commit to git-for-windows/build-extra that referenced this issue Jun 8, 2020
Some Git operations [could end up with bogus modified symbolic
links](git-for-windows/git#2653) (where
`git status` would report changes but `git diff` would not), which
is now fixed.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Jun 9, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Jun 9, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Jun 9, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Jun 9, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 25, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 25, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 27, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 27, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 28, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 28, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 28, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Sep 29, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Sep 29, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Sep 29, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Sep 29, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 29, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Sep 29, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Sep 30, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 1, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 2, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 2, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 2, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 2, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 2, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 2, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 2, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 4, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 4, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 4, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 5, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 5, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 5, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
git-for-windows-ci pushed a commit that referenced this issue Oct 5, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this issue Oct 6, 2020
In #2637, we fixed a bug
where symbolic links' target path sizes were recorded incorrectly in the
index.

However, we did so only in `mingw_lstat()` but not in `fscache_lstat()`.
Meaning: in code paths where the FSCache feature is enabled, Git _still_
got the wrong idea if the symbolic link target's length.

Let's fix this.

Note: as the FSCache feature reads in whole swaths of directory entries
in batch mode, even if metadata for only one of them might be required,
we save the expensive `CreateFile()` call that is required to compute
the symbolic link target's length to the `fscache_lstat()` call.

This fixes #2653.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants