]> git.ipfire.org Git - thirdparty/git.git/commitdiff
gitweb: remove title shortening heuristics
authorJulien Rouhaud <julien.rouhaud@free.fr>
Tue, 26 Jul 2022 13:59:11 +0000 (21:59 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Jul 2022 06:33:17 +0000 (23:33 -0700)
Those heuristics are way outdated and too specific to the kernel project
to be useful outside of kernel.org.  Since kernel.org doesn't use gitweb
anymore and at least one project complained about incorrect behavior,
entirely remove them.

Signed-off-by: Julien Rouhaud <julien.rouhaud@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl

index 1835487ab2aeed33a4aa3e6dbde84df7ae7e6d1b..e66eb3d9bad7cf627d5ed35e13e32dafb556d5cd 100755 (executable)
@@ -3560,23 +3560,6 @@ sub parse_commit_text {
                $title =~ s/^    //;
                if ($title ne "") {
                        $co{'title'} = chop_str($title, 80, 5);
-                       # remove leading stuff of merges to make the interesting part visible
-                       if (length($title) > 50) {
-                               $title =~ s/^Automatic //;
-                               $title =~ s/^merge (of|with) /Merge ... /i;
-                               if (length($title) > 50) {
-                                       $title =~ s/(http|rsync):\/\///;
-                               }
-                               if (length($title) > 50) {
-                                       $title =~ s/(master|www|rsync)\.//;
-                               }
-                               if (length($title) > 50) {
-                                       $title =~ s/kernel.org:?//;
-                               }
-                               if (length($title) > 50) {
-                                       $title =~ s/\/pub\/scm//;
-                               }
-                       }
                        $co{'title_short'} = chop_str($title, 50, 5);
                        last;
                }