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

Unable to read exclude file on network drive #2022

Closed
1 task done
xaelophorus opened this issue Jan 11, 2019 · 7 comments
Closed
1 task done

Unable to read exclude file on network drive #2022

xaelophorus opened this issue Jan 11, 2019 · 7 comments
Assignees
Milestone

Comments

@xaelophorus
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

2.20.1, 64-bit

$ git --version --build-options

git version 2.20.1.windows.1
cpu: x86_64
built from commit: 7c9fbc07db0e2939b36095df45864b8cda19b64f
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?

Windows 7, 64-bit

$ cmd.exe /c ver

Microsoft Windows [Version 6.1.7601]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Notepad++
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Most of my Git work is done on a mapped network drive.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash (also happens on CMD)

# Drive "Z" is a mapped network drive
cd "/z/[username]/My Documents/Repository"
git init testrepo
cd testrepo
git status
  • What did you expect to occur after running these commands?

Expected output from git status to be the default output for an empty Git repository:

$ git status
On branch master

No commits yet

nothing to commit (create/copy files and use "git add" to track)
  • What actually happened instead?

Received a fatal error:

$ git status
fatal: cannot use .git/info/exclude as an exclude file
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

Not a public repository.

Additional Info

I downgraded to 2.19.1 and did not get the error. I then tested with 2.20.0 and received the same error as above. The error is not present when using a local drive (not network).

@PhilipOakley
Copy link

do any other (git?) commands work?

Is the file actually there, or not? and what about the .git and .git/info directory?

Do you know what sort of a network drive it is (type and style of file system / server / network connection etc)

@alegrigoriev
Copy link

There's been a few changes in add_excludes() function, to use fscache for exclude files. I guess one of them caused the regression.

@xaelophorus
Copy link
Author

do any other (git?) commands work

git branch does seem to work normally. If there are any specific commands you would like me to test, I'd be glad to. When running git status on a non-empty repo on the network drive, the output is as follows:

$ git status
baninst1/Functions/f_fgc_wtailor_redirect.sql: Function not implemented
baninst1/Packages/pkg_bdy_ybwsksurv.sql: Function not implemented
baninst1/Packages/pkg_hdr_ybwsksurv.sql: Function not implemented
fatal: cannot use .git/info/exclude as an exclude file

The "Function not implemented" message seems to appear for every (non-Git) file in the repo.

Is the file actually there, or not? and what about the .git and .git/info directory?

Yes, the file is there. From empty repo testrepo:

$ cat .git/info/exclude
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

Do you know what sort of a network drive it is (type and style of file system / server / network connection etc)

It's an NTFS file system shared via SMB protocol, I believe. I'll have to verify that with our network guys.

@dscho
Copy link
Member

dscho commented Jan 28, 2019

Do you know what sort of a network drive it is (type and style of file system / server / network connection etc)

It's an NTFS file system shared via SMB protocol, I believe. I'll have to verify that with our network guys.

Please do. Neither I nor @benpeart were able to reproduce the issue you reported, I tried with \\localhost\c$ and with a Samba directory running in a Hyper-V Ubuntu VM. I simply do not get this error. Maybe Windows 7 is the culprit?

@dscho dscho added this to the v2.20.1(2) milestone Jan 29, 2019
dscho added a commit to git-for-windows/build-extra that referenced this issue Jan 29, 2019
FSCache works again [on network
drives](git-for-windows/git#2022),
in particular [when Windows 8.1 or
older](git-for-windows/git#1989) are
involved.

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

dscho commented Jan 29, 2019

Closed via #2044

@dscho dscho closed this as completed Jan 29, 2019
@dscho
Copy link
Member

dscho commented Jan 30, 2019

A new snapshot is available that should fix this issue. Could I ask y'all to please test?

@xaelophorus
Copy link
Author

xaelophorus commented Jan 30, 2019

Happy to say that the latest snapshot (commit 9f16cdd) no longer has this issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants