-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Ctrl-C on rebase leaves behind a stale index.lock file #338
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
Comments
Any news? This happens to me quite frequently... |
I guess I do not cancel rebases, so the bug does not affect me... To be honest, I have no idea what is really going on. I know what should be going on: Inside MinTTY, an MSys2 Bash is running. From this Bash, you call a shell script, which is handled by the same Bash via forking a new MSys2 process. This process in turn wants to fork a new process for every external executable called by the script, e.g. And here is where things went wrong in my tests earlier this year: To remedy this, I implemented this patch series that makes sure that children of non-MSys2 processes are killed when a SIGTERM was received. My guess is that we would need to do something different there, such as sending a different kind of "signal" via Hopefully this provides you with enough information to go further. |
To be clear: I have unfortunately no time to spend on this ticket in the foreseeable future. |
@orgads would you have time to drive this issue a bit? I think that I know what is going on, but I am too short on time to investigate. |
I can't reproduce it; am on Win7 x64:
|
When interrupting Git processes in Git Bash by pressing Ctrl+C, [Git now removes `.lock` files as designed](git-for-windows/msys2-runtime#15) ([accompanying Git PR](git-for-windows/git#1170); this should also fix [issue #338](git-for-windows/git#338)). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Looks good. Thanks! |
Git for Windows v2.13.1 Changes since Git for Windows v2.13.0 (May 10th 2017) New Features * Comes with Git v2.13.1. * Comes with Git Credential Manager v1.10.0. * Comes with OpenSSH 7.5p1. * Comes with Git Flow v1.11.0. * Comes with Git LFS v2.1.1. * Git now uses the flag introduced with Windows 10 Creators Update to create symbolic links without requiring elevated privileges in Developer Mode. Bug Fixes * The documentation of Git for Windows' several config files was improved. * When interrupting Git processes in Git Bash by pressing Ctrl+C, Git now removes .lock files as designed (accompanying Git PR; this should also fix issue #338). * git status -uno now treats submodules in ignored directories correctly. * The fscache feature no longer slows down git commit -m <message> in large worktrees. * Executing git.exe in Git Bash when the current working directory is a UNC path now works as expected. * Staging/unstaging multiple files in Git GUI via Ctrl+C now works. * When hitting Ctrl+T in Git GUI to stage files, but the file list is empty, Git GUI no longer shows an exception window. This is an "evil merge", i.e. it introduces two changes that were on neither side of the commit history: - t7061 added a test case in upstream that adds a submodule, and the test case GVFS Git added needed to be adjusted to expect that submodule now. - t0025 was removed upstream, but we added a test case in GVFS Git. This test case was moved and adjusted to run first thing in t0027 (which is the legal successor to t0025).
It happens to me frequently that in the middle of a rebase I cancel it using Ctrl-C, and then it leaves a stale index.lock, which must be removed manually.
IIRC I had it with other operations as well, but I can't tell for sure.
The text was updated successfully, but these errors were encountered: