Skip to content

Commit

Permalink
prevent crashes in generateListOfChangesInSubmodulesChangesToolStripM…
Browse files Browse the repository at this point in the history
…enuItem_Click

sets diff.submodule=short explicitly which may not match repo config

fixes gitextensions#4684
  • Loading branch information
minj committed Sep 23, 2018
1 parent 5f2d023 commit 1917c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GitUI/CommandsDialogs/FormCommit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2260,7 +2260,7 @@ private void generateListOfChangesInSubmodulesChangesToolStripMenuItem_Click(obj
foreach (var (path, name) in modules)
{
string diff = Module.RunGitCmd(
string.Format("diff --cached -z -- {0}", name));
string.Format("diff --submodule=short --cached -z -- {0}", name));
var lines = diff.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
const string subprojectCommit = "Subproject commit ";
var from = lines.Single(s => s.StartsWith("-" + subprojectCommit)).Substring(subprojectCommit.Length + 1);
Expand Down

0 comments on commit 1917c2d

Please sign in to comment.