@@ -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) {
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@gmail.com> --- builtin/hash-object.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)