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

Error when stashing deletions #1435

Closed
1 task done
ChaseGrant opened this issue Jan 19, 2018 · 12 comments
Closed
1 task done

Error when stashing deletions #1435

ChaseGrant opened this issue Jan 19, 2018 · 12 comments

Comments

@ChaseGrant
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?
git version 2.16.0.windows.2
cpu: x86_64
built from commit: a56c4f9e2a9513d2be57dc4346e0e84887399cd9
sizeof-long: 4
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Microsoft Windows [Version 6.3.9600]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
Editor Option: Notepad++
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Nothing I can think of.

Details

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

PowerShell

git add .
git stash
  • What did you expect to occur after running these commands?

Expected a stash save and a reset to a clean repo.

  • What actually happened instead?

I got a few "error: unable to stat just-written file: No such file or directory" errors and the repo was not reset. The files mentioned are files I had removed locally.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

It's a private repository.

@dscho
Copy link
Member

dscho commented Jan 19, 2018

That does not reproduce here. You may want to try with a fresh repository that you can make public, so as to verify that it is not a problem with your private repository -- in which case nobody could help you, anyway, because you did not provide a Minimal, Complete & Verifiable Example (as suggested by our issue reporting template).

@csmager
Copy link

csmager commented Jan 19, 2018

I haven't got a minimal repro either, but just to add that I have seen this & similar issues since updating to 2.16.0 today. If I get a chance in the next few days I'll see if I can re-create.

@dscho
Copy link
Member

dscho commented Jan 19, 2018

@csmager greatly appreciated!

@PhilipOakley
Copy link

There is a segfault issue / pathch going around the main Git list that has been traced to having files differeing in case, which is more likely on large repos.

Have a review of the thread https://public-inbox.org/git/CALwADsGfB10f5+nOFN-pHCt4z1SkWMcvSHn8KokcyCM0V6K-BA@mail.gmail.com/ with patch starting at https://public-inbox.org/git/20180119041825.727904-1-sandals@crustytoothpaste.net/

If @ChaseGrant or @csmager could try out the repoduction steps in the thread, or check if they have the same underlying issue, then that would be a start, especally as a patch is available for testing.

@dscho
Copy link
Member

dscho commented Jan 20, 2018

Not to mention that coming back with information will help your issue getting resolved quickly.

For example, if the patch in question turns out to address the reported bug, we could have a new Git for Windows release as soon as coming week, and a (fully working) snapshot installer as soon as in a couple of hours. The quicker you react, the quicker you will have a fix.

@ChaseGrant
Copy link
Author

@PhilipOakley Following the steps in that link definitely crash GIT for me. Unsure if it's related to my stash issues or not.
@dscho Sorry for not satisfying the ticket logging requirements. I will attempt to create a public repo to recreate.

@ChaseGrant
Copy link
Author

ChaseGrant commented Jan 22, 2018

I can reproduce with this test repo: https://github.com/ChaseGrant/GITTest

Steps to reproduce:

  • Clone repo
  • Delete the Test.txt file
  • GIT add .
  • GIT stash

I then get the following error:

Saved working directory and index state WIP on master: 5c8921c Test file added
error: unable to stat just-written file Test.txt: No such file or directory
fatal: Could not reset index file to revision 'HEAD'.

I am running Windows 8.1 Enterprise x64 in case the Windows version in the first ticket was not enough information.

@csmager
Copy link

csmager commented Jan 22, 2018

I can also confirm that cloning the vim-colorschemes repo per the mailing list causes git to crash. In event viewer, I see

Faulting application name: git.exe, version: 2.16.0.2, time stamp: 0x5a610d37
Faulting module name: git.exe, version: 2.16.0.2, time stamp: 0x5a610d37
Exception code: 0xc0000005
Fault offset: 0x0000000000117133
Faulting process ID: 0x1e20
Faulting application start time: 0x01d3935ffa255e7b
Faulting application path: C:\Program Files\Git\mingw64\bin\git.exe
Faulting module path: C:\Program Files\Git\mingw64\bin\git.exe
Report ID: 73cae1a2-ebe3-4209-9b55-e6b94d662ce6
Faulting package full name:
Faulting package-relative application ID:

And following @ChaseGrant's steps above with the test repo, I also get:

Saved working directory and index state WIP on master: 5c8921c Test file added
error: unable to stat just-written file Test.txt: No such file or directory
fatal: Could not reset index file to revision 'HEAD'.

@csmager
Copy link

csmager commented Jan 22, 2018

It does seem to me that this issue is related to (if not the same as) the ones raised subsequently as #1437, #1438, #1440 and #1442.

@koppor
Copy link

koppor commented Jan 22, 2018

For me, I think, this is #1440.

I updated to git version 2.16.0.windows.2. It worked with git version 2.15.1.windows.2.

I found this issue here while searching for

error: unable to stat just-written file

koppor@aslap3 MINGW64 /c/git-repositories/jabref/cloudref (master)
$ git worktree add ../cloudref-docker docker
Preparing ../cloudref-docker (identifier cloudref-docker)
error: unable to stat just-written file .gitattributes: No such file or directory

@dscho
Copy link
Member

dscho commented Jan 22, 2018

Indeed. I think this will be fixed in Git for Windows v2.16.1 (which I am busy releasing as we speak).

@dscho dscho closed this as completed Jan 22, 2018
@ChaseGrant
Copy link
Author

Confirmed as fixed.

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

No branches or pull requests

5 participants