mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
Merge pull request #200 from gadfly3173/fix/working-copy
fix: NRE in WorkingCopy (#199)
This commit is contained in:
commit
c713210a9e
2 changed files with 13 additions and 27 deletions
|
@ -53,9 +53,7 @@ namespace SourceGit
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
var builder = new StringBuilder();
|
var builder = new StringBuilder();
|
||||||
builder.Append("Crash: ");
|
builder.Append($"Crash::: {ex.GetType().FullName}: {ex.Message}\n\n");
|
||||||
builder.Append(ex.Message);
|
|
||||||
builder.Append("\n\n");
|
|
||||||
builder.Append("----------------------------\n");
|
builder.Append("----------------------------\n");
|
||||||
builder.Append($"Version: {Assembly.GetExecutingAssembly().GetName().Version}\n");
|
builder.Append($"Version: {Assembly.GetExecutingAssembly().GetName().Version}\n");
|
||||||
builder.Append($"OS: {Environment.OSVersion.ToString()}\n");
|
builder.Append($"OS: {Environment.OSVersion.ToString()}\n");
|
||||||
|
|
|
@ -190,29 +190,17 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
_repo = null;
|
_repo = null;
|
||||||
|
|
||||||
if (_selectedUnstaged != null)
|
_selectedUnstaged.Clear();
|
||||||
{
|
OnPropertyChanged(nameof(SelectedUnstaged));
|
||||||
_selectedUnstaged.Clear();
|
|
||||||
OnPropertyChanged(nameof(SelectedUnstaged));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_selectedStaged != null)
|
_selectedStaged.Clear();
|
||||||
{
|
OnPropertyChanged(nameof(SelectedStaged));
|
||||||
_selectedStaged.Clear();
|
|
||||||
OnPropertyChanged(nameof(SelectedStaged));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_unstaged != null)
|
_unstaged.Clear();
|
||||||
{
|
OnPropertyChanged(nameof(Unstaged));
|
||||||
_unstaged.Clear();
|
|
||||||
OnPropertyChanged(nameof(Unstaged));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_staged != null)
|
_staged.Clear();
|
||||||
{
|
OnPropertyChanged(nameof(Staged));
|
||||||
_staged.Clear();
|
|
||||||
OnPropertyChanged(nameof(Staged));
|
|
||||||
}
|
|
||||||
|
|
||||||
_detailContext = null;
|
_detailContext = null;
|
||||||
_commitMessage = string.Empty;
|
_commitMessage = string.Empty;
|
||||||
|
@ -1210,10 +1198,10 @@ namespace SourceGit.ViewModels
|
||||||
private bool _isCommitting = false;
|
private bool _isCommitting = false;
|
||||||
private bool _useAmend = false;
|
private bool _useAmend = false;
|
||||||
private bool _canCommitWithPush = false;
|
private bool _canCommitWithPush = false;
|
||||||
private List<Models.Change> _unstaged = null;
|
private List<Models.Change> _unstaged = [];
|
||||||
private List<Models.Change> _staged = null;
|
private List<Models.Change> _staged = [];
|
||||||
private List<Models.Change> _selectedUnstaged = null;
|
private List<Models.Change> _selectedUnstaged = [];
|
||||||
private List<Models.Change> _selectedStaged = null;
|
private List<Models.Change> _selectedStaged = [];
|
||||||
private int _count = 0;
|
private int _count = 0;
|
||||||
private object _detailContext = null;
|
private object _detailContext = null;
|
||||||
private string _commitMessage = string.Empty;
|
private string _commitMessage = string.Empty;
|
||||||
|
|
Loading…
Reference in a new issue