From 5e5c27a2034b8a995818d6406964ac40385afb76 Mon Sep 17 00:00:00 2001
From: Juerd Waalboer <juerd@tnx.nl>
Date: Sun, 29 Jan 2023 22:52:02 +0100
Subject: [PATCH] Remove dead code

As a side effect of a7a5f14e, "123 x <product>" (with a space between the
number and the operator) is no longer supported. Breaking that was
unintentional, but since it was an undocumented feature and unintuitive
hack anyway, the feature won't come back.

When it still worked, it was implemented by *converting* a raw amount
(withdrawal or unlisted product, which you could still enter as just a
number -- since the aforementioned commit you need to be explicit and
use `withdraw` or `unlisted`) into a stub that would finally apply a
repetition when adding something else.
---
 plugins/repeat | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/plugins/repeat b/plugins/repeat
index 4cb87fe..8a13853 100644
--- a/plugins/repeat
+++ b/plugins/repeat
@@ -1,7 +1,7 @@
 #!perl
 
-HELP "*<N>, x<N>, <N>x, <N>*" => "Set quantity of previous/next product";
-HELP "-<N>, +<N>" => "Decrease/increase quantity of previous product";
+HELP "<N>x, <N>*" => "Set quantity of previous/next product";
+HELP "-<N>, +<N>, *<N>, x<N>" => "Change quantity of previous product";
 
 my $err_stacked = "Stacked repetition is not supported.";
 my $err_pfand = "Plugins 'pfand' and 'repeat' cannot be combined.";
@@ -60,12 +60,6 @@ sub command($self, $cart, $command, @) {
             $self->{op} = $op;
             return "$op how many?",  \&plusminus;
         }
-
-        if ($last->has_attribute('is_withdrawal')) {
-            $lhs = $last->{amount}->abs->float;
-            $lhs == int $lhs or return REJECT, "Repeat only works on integers.";
-            $cart->delete($last);
-        }
     }
 
     if ($lhs) {