From 6091f583dc741f5ba39985c6c71313dee5a12816 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 21 Jan 2024 12:33:15 -1000 Subject: [PATCH] fix: import: --catchup works again [#2156] --- hledger/Hledger/Cli/Commands/Import.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Import.hs b/hledger/Hledger/Cli/Commands/Import.hs index bf9638e3a..f53c91954 100644 --- a/hledger/Hledger/Cli/Commands/Import.hs +++ b/hledger/Hledger/Cli/Commands/Import.hs @@ -65,8 +65,12 @@ importcmd opts@CliOpts{rawopts_=rawopts,inputopts_=iopts} j = do let semicolon = if dryrun then "; " else "" :: String printf "%sno new transactions found in %s\n\n" semicolon inputstr - newts | catchup -> do - printf "marked %s as caught up, skipping %d unimported transactions\n\n" inputstr (length newts) + newts | catchup -> + if dryrun + then printf "--catchup would skip %d transactions (dry run)\n\n" (length newts) + else do + printf "marked %s as caught up, skipping %d transactions\n\n" inputstr (length newts) + saveLatestDatesForFiles latestdatesforfiles newts -> do if dryrun