]> Lady’s Gitweb - Gitweb/commit
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)
commit6d265b373bd7b368a71f314a64b39c0ee8e056f424d02094747a96fdcb6a242f
tree6a55fea98d4a19f77fbfc9aeaed825dcc7ff52ebfee863220d4be8e95e1363e0
parentf90195d01fe8acdcefc7113133e0db812dafefaa07c722d3072882479df43093
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.024171 seconds and 5 git commands to generate.