Namhyung Kim <namhyung@xxxxxxxxxx> writes: > If $signoff set to 1, the $line would be handled in > the if statement for the both cases. So the outer of > the conditional always sees the $signoff always set > to 0 and no need to check it. Thus we can finally get > rid of it. > > Also rename $empty to more clear $skip_blank_line as > suggested by Junio. Thanks. It does not make it clear that you fixed a bug in the original, so let me rephrase it like so: -- >8 -- From: Namhyung Kim <namhyung@xxxxxxxxxx> Date: Wed, 4 Jul 2012 11:47:24 +0900 Subject: [PATCH] gitweb: Cleanup git_print_log() When we see a signed-off-by line (and its friends), we set $signoff to true, but then we process the next line after we are done without giving control to the rest of the loop. And when the line we saw is not a signed-off-by line, we reset $signoff to false before running the remainder of the loop. Hence, the check for $signoff that attempts to remove an extra empty line between two signed-off-by line was not doing anything useful. Rename $empty to a more explicit name $skip_blank_line to tell us to skip a blank line when we see one, set it after we see and emit a blank line (to avoid showing more than one empty lines in a raw) or after we handle a signed-off-by line (to avoid empty lines after such a line), to fix this bug, and get rid of the $signoff variable that is not useful. Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html