gitextensions / gitextensions

Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
https://gitextensions.github.io/
Other
7.78k stars 2.09k forks source link

Stage All throws an exception when a single item is selected #3989

Closed bshafer closed 6 years ago

bshafer commented 7 years ago

What is the issue kind?

What is the current behavior?

In the Commit window, clicking on the "Stage All" button can crash the application

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

In the Commit window, select one of the unstaged items. Then, click on the double-arrow button to move stage all the files. An exception is thrown. This might only be thrown when there is a sub-module update (not sure), but when I click on the submodule, the diff view shows:

Unsupported file:

System.ArgumentNullException: Value cannot be null.
Parameter name: path2
   at System.IO.Path.Combine(String path1, String path2)
   at GitCommands.GitModule.GetSubmoduleFullPath(String localPath)
   at ResourceManager.LocalizationHelpers.ProcessSubmoduleStatus(GitModule module, GitSubmoduleStatus status)
   at GitUI.Editor.FileViewer.<>c__DisplayClass91_0.<ViewCurrentChanges>b__1()
   at GitCommands.AsyncLoader.<>c__DisplayClass21_0`1.<Load>b__0(CancellationToken token)
   at GitCommands.AsyncLoader.<>c__DisplayClass22_0`1.<Load>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

What is the expected behavior?

All the files should be staged.

Environment you encounter the issue:

Did this work in previous version of GitExtensions (which)?

I know it still crashed in 2.50.01.

RussKie commented 7 years ago

It is likely be some kind of environmental issue.

RussKie commented 6 years ago

Closing due to lack of follow up