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

Can't delete index.lock because it is being used by another process. #3902

Closed
RussKie opened this issue Aug 15, 2017 · 0 comments
Closed

Can't delete index.lock because it is being used by another process. #3902

RussKie opened this issue Aug 15, 2017 · 0 comments
Assignees
Milestone

Comments

@RussKie
Copy link
Member

RussKie commented Aug 15, 2017

Do you want to request a feature or report a bug?
bug

What is the current behavior?
I have a project opened in VSCode and the same working folder opened in GE. It looks like VSCode runs git process as well and creates/locks .gitconfig

image

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at GitUI.CommandsDialogs.FormBrowse.deleteIndexlockToolStripMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

What is the expected behavior?
It should fail gracefully.

Environment you encounter the issue:

  • GitExtensions version:
  • GIT version: 2.50RC2
  • OS version: Win8.1
@RussKie RussKie self-assigned this Aug 15, 2017
RussKie added a commit to RussKie/gitextensions that referenced this issue Aug 15, 2017
If the same working directory opened in multiple git processes (i.e. in
GitExtensions and VSCode) attempt to delete index.lock may result in
IOException and termination of GE.

Fixes gitextensions#3902
RussKie added a commit to RussKie/gitextensions that referenced this issue Aug 16, 2017
If the same working directory opened in multiple git processes (i.e. in
GitExtensions and VSCode) attempt to delete index.lock may result in
IOException and termination of GE.

Fixes gitextensions#3902
RussKie added a commit that referenced this issue Aug 19, 2017
If the same working directory opened in multiple git processes (i.e. in
GitExtensions and VSCode) attempt to delete index.lock may result in
IOException and termination of GE.

Fixes #3902

(cherry picked from commit 377582a)
@RussKie RussKie added this to the 2.50.02 milestone Aug 19, 2017
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

1 participant