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

[NBug] Could not find a part of the path '{ProjectDir}.git\rebase-merge\git-rebase-todo' #9080

Closed
ddimkovikj opened this issue Apr 16, 2021 · 1 comment · Fixed by #9094
Closed

Comments

@ddimkovikj
Copy link

Current behaviour

Git Extensions crashes when unable to find rebase file.

Expected behaviour

When unable to find rebase file Git Extensions should report missing file instead of crashing .

Steps to reproduce

  1. Start one instance of Git Extensions and do an interactive rebase.
  2. Modify anything in the commit window.
  3. Start another instance of Git Extensions and abort the rebase
  4. Click Save in the commit window on the first Git Extensions instance.

Error Details

System.IO.DirectoryNotFoundException: Could not find a part of the path '{ProjectDir}.git\rebase-merge\git-rebase-todo'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
   at GitUI.CommandsDialogs.FormEditor.SaveChanges()
   at GitUI.CommandsDialogs.FormEditor.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at ResourceManager.GitExtensionsControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at ResourceManager.GitExtensionsControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

Additional information

I was doing interactive rebase while having another instance of Git Extensions opened.

Environment

  • Git Extensions 3.4.3.9999
  • Build d4b0f48
  • Git 2.28.0.windows.1
  • Microsoft Windows NT 10.0.18363.0
  • .NET Framework 4.8.4250.0
  • DPI 96dpi (no scaling)
@mstv
Copy link
Member

mstv commented Apr 16, 2021

You could close the BugReportForm using the cross button in order to ignore the exception.

The presentation will improve with 9a9c8ae.
I would create a PR for 3.5 after #9063.

@ghost ghost added 🚧 status: in progress Issues which have associated PRs and removed 🚧 status: in progress Issues which have associated PRs labels Apr 20, 2021
@RussKie RussKie linked a pull request Apr 21, 2021 that will close this issue
@RussKie RussKie closed this as completed Apr 24, 2021
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

Successfully merging a pull request may close this issue.

3 participants