diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 70b140d1..b4f93e38 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -92,7 +92,7 @@ namespace SourceGit var toplevel = GetTopLevel() as Window; if (toplevel == null) return; - + var dialog = new Views.Preference(); dialog.ShowDialog(toplevel); }); @@ -102,7 +102,7 @@ namespace SourceGit var toplevel = GetTopLevel() as Window; if (toplevel == null) return; - + var dialog = new Views.Hotkeys(); dialog.ShowDialog(toplevel); }); @@ -112,7 +112,7 @@ namespace SourceGit var toplevel = GetTopLevel() as Window; if (toplevel == null) return; - + var dialog = new Views.About(); dialog.ShowDialog(toplevel); }); @@ -247,7 +247,7 @@ namespace SourceGit var geo = Current?.FindResource(key) as StreamGeometry; if (geo != null) icon.Data = geo; - + return icon; } @@ -257,7 +257,7 @@ namespace SourceGit { return desktop.MainWindow; } - + return null; } diff --git a/src/Commands/Diff.cs b/src/Commands/Diff.cs index 56c924e5..2d7a8ec2 100644 --- a/src/Commands/Diff.cs +++ b/src/Commands/Diff.cs @@ -14,7 +14,8 @@ namespace SourceGit.Commands public Diff(string repo, Models.DiffOption opt, int unified) { - _result.TextDiff = new Models.TextDiff() { + _result.TextDiff = new Models.TextDiff() + { Repo = repo, Option = opt, }; diff --git a/src/Commands/QuerySingleCommit.cs b/src/Commands/QuerySingleCommit.cs index eef08b7e..6c242631 100644 --- a/src/Commands/QuerySingleCommit.cs +++ b/src/Commands/QuerySingleCommit.cs @@ -38,7 +38,5 @@ namespace SourceGit.Commands return null; } - - } } diff --git a/src/Commands/QueryTrackStatus.cs b/src/Commands/QueryTrackStatus.cs index ce8e4d0e..abd5d5f4 100644 --- a/src/Commands/QueryTrackStatus.cs +++ b/src/Commands/QueryTrackStatus.cs @@ -4,7 +4,7 @@ namespace SourceGit.Commands { public class QueryTrackStatus : Command { - public QueryTrackStatus(string repo, string local, string upstream) + public QueryTrackStatus(string repo, string local, string upstream) { WorkingDirectory = repo; Context = repo; diff --git a/src/Views/Histories.axaml.cs b/src/Views/Histories.axaml.cs index 9e1bae46..86102d43 100644 --- a/src/Views/Histories.axaml.cs +++ b/src/Views/Histories.axaml.cs @@ -106,7 +106,7 @@ namespace SourceGit.Views if (ShowAsDateTime) StopTimer(); else - StartTimer(); + StartTimer(); } } diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs index d8972c80..cfc392f1 100644 --- a/src/Views/TextDiffView.axaml.cs +++ b/src/Views/TextDiffView.axaml.cs @@ -37,9 +37,9 @@ namespace SourceGit.Views if (old == null) return true; - return Math.Abs(Y - old.Y) > 0.001 || - Math.Abs(Height - old.Height) > 0.001 || - StartIdx != old.StartIdx || + return Math.Abs(Y - old.Y) > 0.001 || + Math.Abs(Height - old.Height) > 0.001 || + StartIdx != old.StartIdx || EndIdx != old.EndIdx || Combined != Combined || IsOldSide != IsOldSide; @@ -1217,7 +1217,7 @@ namespace SourceGit.Views } } - private void OnDiscardChunk(object sender, RoutedEventArgs e) + private void OnDiscardChunk(object sender, RoutedEventArgs e) { var chunk = SelectedChunk; if (chunk == null) @@ -1260,12 +1260,12 @@ namespace SourceGit.Views if (change.Index == Models.ChangeState.Added) { diff.GenerateNewPatchFromSelection(change, null, selection, true, tmpFile); - } + } else if (chunk.Combined) { var treeGuid = new Commands.QueryStagedFileBlobGuid(diff.Repo, change.Path).Result(); diff.GeneratePatchFromSelection(change, treeGuid, selection, true, tmpFile); - } + } else { var treeGuid = new Commands.QueryStagedFileBlobGuid(diff.Repo, change.Path).Result();