From 765761c5bf49799e7d74535b9727062c869fc358 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Fri, 22 Dec 2023 15:51:14 +0100 Subject: commands: simplify CompletePath This function is overly complex, has code duplication and is not preserving user input (converting all paths to absolute paths). Simplify it and avoid converting relative paths to absolute ones. Add unit tests to ensure it works as expected. Signed-off-by: Robin Jarry Tested-by: Bence Ferdinandy --- commands/testdata/baz/unused.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 commands/testdata/baz/unused.txt (limited to 'commands/testdata/baz/unused.txt') diff --git a/commands/testdata/baz/unused.txt b/commands/testdata/baz/unused.txt new file mode 100644 index 00000000..573541ac --- /dev/null +++ b/commands/testdata/baz/unused.txt @@ -0,0 +1 @@ +0 -- cgit