Skip to content

Commit

Permalink
gitweb: remove title shortening heuristics
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
rjuju authored and gitster committed Jul 27, 2022
1 parent bbea4dc commit 75707da
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 75707da

Please sign in to comment.