File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -353,8 +353,8 @@ while IFS= read -u 4 -r -d '' file; do
353353 # Auto-discard ignored files
354354 rm -f " $file "
355355 elif git_ignored_should_discard " $rel_path " ; then
356+ (( ++ GIT_IGNORED_COUNT)) # pre-increment to avoid returning non-zero status
356357 rm -f " $file "
357- (( GIT_IGNORED_COUNT++ ))
358358 else
359359 FILES+=(" $rel_path " )
360360 fi
Original file line number Diff line number Diff line change @@ -633,7 +633,7 @@ proc test_git_ignored_discard_all {} {
633633 -re {Git-ignored file detected:} {
634634 expect {
635635 -re {How should git-ignored files be handled.*\?} {
636- send "D \r"
636+ send "R \r"
637637 expect {
638638 "→ All git-ignored files will be discarded" {
639639 # Should see "Discarded N git-ignored file(s)"
@@ -860,7 +860,7 @@ proc test_git_ignored_invalid_input {} {
860860 # Now send valid input
861861 expect {
862862 -re {How should git-ignored files be handled.*\?} {
863- send "D \r"
863+ send "R \r"
864864 expect {
865865 "→ All git-ignored files will be discarded" {
866866 expect eof
You can’t perform that action at this time.
0 commit comments