@@ -59,24 +59,16 @@ public Models.Stash SelectedStash
59
59
Task . Run ( ( ) =>
60
60
{
61
61
var changes = new Commands . CompareRevisions ( _repo . FullPath , $ "{ value . SHA } ^", value . SHA ) . Result ( ) ;
62
- var untracked = new HashSet < string > ( ) ;
63
- if ( value . HasUntracked )
62
+ if ( value . Parents . Count == 3 )
64
63
{
65
- var untrackedChanges = new Commands . CompareRevisions ( _repo . FullPath , "4b825dc642cb6eb9a060e54bf8d69288fbee4904" , value . Parents [ 2 ] ) . Result ( ) ;
66
- foreach ( var c in untrackedChanges )
67
- {
68
- untracked . Add ( c . Path ) ;
64
+ var untracked = new Commands . CompareRevisions ( _repo . FullPath , "4b825dc642cb6eb9a060e54bf8d69288fbee4904" , value . Parents [ 2 ] ) . Result ( ) ;
65
+ foreach ( var c in untracked )
69
66
changes . Add ( c ) ;
70
- }
71
- }
72
67
73
- changes . Sort ( ( l , r ) => Models . NumericSort . Compare ( l . Path , r . Path ) ) ;
68
+ changes . Sort ( ( l , r ) => string . Compare ( l . Path , r . Path , StringComparison . Ordinal ) ) ;
69
+ }
74
70
75
- Dispatcher . UIThread . Invoke ( ( ) =>
76
- {
77
- Changes = changes ;
78
- _untrackedChanges = untracked ;
79
- } ) ;
71
+ Dispatcher . UIThread . Invoke ( ( ) => Changes = changes ) ;
80
72
} ) ;
81
73
}
82
74
}
@@ -102,7 +94,7 @@ public Models.Change SelectedChange
102
94
{
103
95
if ( value == null )
104
96
DiffContext = null ;
105
- else if ( _untrackedChanges . Contains ( value . Path ) )
97
+ else if ( value . Index == Models . ChangeState . Added && _selectedStash . Parents . Count == 3 )
106
98
DiffContext = new DiffContext ( _repo . FullPath , new Models . DiffOption ( "4b825dc642cb6eb9a060e54bf8d69288fbee4904" , _selectedStash . Parents [ 2 ] , value ) , _diffContext ) ;
107
99
else
108
100
DiffContext = new DiffContext ( _repo . FullPath , new Models . DiffOption ( _selectedStash . Parents [ 0 ] , _selectedStash . SHA , value ) , _diffContext ) ;
@@ -178,7 +170,7 @@ public ContextMenu MakeContextMenu(Models.Stash stash)
178
170
var opts = new List < Models . DiffOption > ( ) ;
179
171
foreach ( var c in _changes )
180
172
{
181
- if ( _untrackedChanges . Contains ( c . Path ) )
173
+ if ( c . Index == Models . ChangeState . Added && _selectedStash . Parents . Count == 3 )
182
174
opts . Add ( new Models . DiffOption ( "4b825dc642cb6eb9a060e54bf8d69288fbee4904" , _selectedStash . Parents [ 2 ] , c ) ) ;
183
175
else
184
176
opts . Add ( new Models . DiffOption ( _selectedStash . Parents [ 0 ] , _selectedStash . SHA , c ) ) ;
@@ -303,7 +295,6 @@ private void RefreshVisible()
303
295
private List < Models . Stash > _visibleStashes = new List < Models . Stash > ( ) ;
304
296
private string _searchFilter = string . Empty ;
305
297
private Models . Stash _selectedStash = null ;
306
- private HashSet < string > _untrackedChanges = new HashSet < string > ( ) ;
307
298
private List < Models . Change > _changes = null ;
308
299
private Models . Change _selectedChange = null ;
309
300
private DiffContext _diffContext = null ;
0 commit comments