From: Junio C Hamano Date: Tue, 22 Jan 2019 23:18:18 GMT Subject: Re: [PATCH 3/3] diff.c: simplify diff_opt_break_rewrites() Message-ID: In-Reply-To: Junio C Hamano writes: > It would make it even easier to follow if you did > > if (*arg == '/') { > opt2 = ...; > arg++; > } else { Oops, this should read "else if (!*arg) {", of course, to match the original. Sorry for the noise. > opt2 = 0; > } And then we'd want a blank line here to make it clear that the previous if/else cascade has finished, and the error checking we see next is not part of it. > if (*arg) > return error(...); > > It makes it clear that opt2==0 means form and not / form, > by having an explicit assignment while we parse what *arg points at, > without the initialization to 0 in the variable definition.