]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Fix setting $/ in parse_commit()
[Gitweb] / gitweb.perl
index b3e6ed0e6a1570320dfadc0914834c11237d9a320a6449a5a41835b7813f615f..63416f8ccce5eecd72193bf4dafe620bf9117561afc94ecbf27f94a0ed79382c 100755 (executable)
@@ -1102,12 +1102,11 @@ sub parse_commit {
        if (defined $commit_text) {
                @commit_lines = @$commit_text;
        } else {
-               $/ = "\0";
+               local $/ = "\0";
                open my $fd, "-|", git_cmd(), "rev-list", "--header", "--parents", "--max-count=1", $commit_id
                        or return;
                @commit_lines = split '\n', <$fd>;
                close $fd or return;
-               $/ = "\n";
                pop @commit_lines;
        }
        my $header = shift @commit_lines;
This page took 0.266706 seconds and 4 git commands to generate.