From 1ad022a616fb7232e19eb0bae508bffd332082d4 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Tue, 9 May 2023 21:45:20 +0200 Subject: [PATCH] Fix 'diff' command when no files are specified --- osc/commandline.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 522c26ea..adba1711 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4646,7 +4646,12 @@ Please submit there instead, or use --nodevelproject to force direct submission. for i in pac.get_diff(rev1): diff += b''.join(i) else: - files = args + if args == ["."]: + # parseargs() returns ["."] (list with workdir) if no args are specified + # "." is illegal filename that causes server to return 400 + files = None + else: + files = args diff += server_diff_noex(pac.apiurl, pac.prjname, pac.name, rev1, pac.prjname, pac.name, rev2, not opts.plain, opts.missingok, opts.meta, not opts.unexpand, files=files)