]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Cleanup git_print_log()
authorNamhyung Kim <redacted>
Wed, 4 Jul 2012 02:47:24 +0000 (11:47 +0900)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:32 +0000 (00:51 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>

No differences found
This page took 0.254255 seconds and 4 git commands to generate.