Skip to content

Commit

Permalink
Merge pull request #1912 from timbrel/hotfix-1911
Browse files Browse the repository at this point in the history
  • Loading branch information
kaste authored Apr 23, 2024
2 parents 3d75d38 + 16f9a7b commit ecb50b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/interfaces/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,11 @@ def do_discard(file_paths: List[str]):
f.path for f in selected_unstaged_files
if f.working_status == "R"
]
self.undo_intent_to_add(*files_to_unintent)
do_discard([f for f in file_paths if f not in files_to_unintent])
if files_to_unintent:
self.undo_intent_to_add(*files_to_unintent)
files_to_discard = [f for f in file_paths if f not in files_to_unintent]
if files_to_discard:
do_discard(files_to_discard)
return file_paths
return None

Expand Down

0 comments on commit ecb50b0

Please sign in to comment.