From 9edb8ff384a1f30e336015af89a0b02e6ff49515 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 17 May 2026 13:21:39 +0200 Subject: [PATCH] chore: Make overwriting put the default for storage-test-client --- test/storage/client/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/storage/client/main.cpp b/test/storage/client/main.cpp index e67c00ea..ea204c9d 100644 --- a/test/storage/client/main.cpp +++ b/test/storage/client/main.cpp @@ -54,9 +54,9 @@ Commands: exists KEY check if a value exists in storage get KEY -o FILE get a value and output to file get KEY -o - get a value and output to stdout - put [--overwrite] KEY -i FILE put a value from file - put [--overwrite] KEY -i - put a value from stdin - put [--overwrite] KEY -v VALUE put a literal value + put [-n] KEY -i FILE put a value from file (-n = no overwrite) + put [-n] KEY -i - put a value from stdin (-n = no overwrite) + put [-n] KEY -v VALUE put a literal value (-n = no overwrite) remove KEY remove a value from storage Notes: @@ -159,11 +159,11 @@ cmd_info(Client& client, const std::vector& args) tl::expected cmd_put(Client& client, const std::vector& args) { - Client::PutFlags flags; + Client::PutFlags flags{.overwrite = true}; size_t start_idx = 0; - if (!args.empty() && args[0] == "--overwrite") { - flags.overwrite = true; + if (!args.empty() && args[0] == "-n") { + flags.overwrite = false; start_idx = 1; } -- 2.47.3