Skip to content

Commit baf2ed6

Browse files
authored
fix: sort staged+amend changes the same way as ordinary staged changes (#2441)
1 parent 4e12bb4 commit baf2ed6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/ViewModels/WorkingCopy.cs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,11 @@ public async Task CommitAsync(bool autoStage, bool autoPush)
708708
private List<Models.Change> GetStagedChanges(List<Models.Change> cached)
709709
{
710710
if (_useAmend)
711-
return new Commands.QueryStagedChangesWithAmend(_repo.FullPath).GetResult();
711+
{
712+
var changes = new Commands.QueryStagedChangesWithAmend(_repo.FullPath).GetResult();
713+
changes.Sort((l, r) => Models.NumericSort.Compare(l.Path, r.Path));
714+
return changes;
715+
}
712716

713717
var rs = new List<Models.Change>();
714718
foreach (var c in cached)

0 commit comments

Comments
 (0)