Skip to content

Commit bc3ee04

Browse files
committed
code_style: fast check when the local changed file list does not change
Signed-off-by: leo <longshuang@msn.cn>
1 parent 1445b53 commit bc3ee04

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/ViewModels/WorkingCopy.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,8 @@ public WorkingCopy(Repository repo)
231231

232232
public void SetData(List<Models.Change> changes)
233233
{
234-
do
234+
if (!IsChanged(_cached, changes))
235235
{
236-
if (IsChanged(_cached, changes))
237-
break;
238-
239236
if (_useAmend)
240237
{
241238
var testStaged = GetStagedChanges(_cached);
@@ -269,9 +266,7 @@ public void SetData(List<Models.Change> changes)
269266
UpdateInProgressState();
270267
UpdateDetail();
271268
return;
272-
#pragma warning disable CS0162
273-
} while (false);
274-
#pragma warning restore CS0162
269+
}
275270

276271
var lastSelectedUnstaged = new HashSet<string>();
277272
if (_selectedUnstaged is { Count: > 0 })

0 commit comments

Comments
 (0)