Refactor code that was changed to this form in 4a3d85dcf67 (add --no-filters option to git hash-object, 2008-08-03), seemingly for no good reason. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> --- builtin/hash-object.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/builtin/hash-object.c b/builtin/hash-object.c index 4d3b8c49d2..4b337e0d25 100644 --- a/builtin/hash-object.c +++ b/builtin/hash-object.c @@ -130,12 +130,10 @@ int cmd_hash_object(int argc, const char **argv, const char *prefix) errstr = "Can't specify files with --stdin-paths"; else if (vpath) errstr = "Can't use --stdin-paths with --path"; - } - else { - if (hashstdin > 1) - errstr = "Multiple --stdin arguments are not supported"; - if (vpath && no_filters) - errstr = "Can't use --path with --no-filters"; + } else if (hashstdin > 1) { + errstr = "Multiple --stdin arguments are not supported"; + } else if (vpath && no_filters) { + errstr = "Can't use --path with --no-filters"; } if (errstr) { -- 2.31.1.723.ga5d7868e4a