Skip to content

Commit f29db85

Browse files
committed
Merge branch 'maint'
* maint: gitweb: Include links to feeds in HTML header only for '200 OK' response fsck docs: remove outdated and useless diagnostic userdiff: fix typo in ruby and python word regexes trace.c: mark file-local function static Fix typo in git-gc document.
2 parents 4de0bbd + 05bb5a2 commit f29db85

6 files changed

Lines changed: 52 additions & 50 deletions

File tree

Documentation/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ gc.packrefs::
996996
Running `git pack-refs` in a repository renders it
997997
unclonable by Git versions prior to 1.5.1.2 over dumb
998998
transports such as HTTP. This variable determines whether
999-
'git gc' runs `git pack-refs`. This can be set to `nobare`
999+
'git gc' runs `git pack-refs`. This can be set to `notbare`
10001000
to enable it within all non-bare repos or it can be set to a
10011001
boolean value. The default is `true`.
10021002

Documentation/git-fsck.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ dangling <type> <object>::
123123
The <type> object <object>, is present in the database but never
124124
'directly' used. A dangling commit could be a root node.
125125

126-
warning: git-fsck: tree <tree> has full pathnames in it::
127-
And it shouldn't...
128-
129126
sha1 mismatch <object>::
130127
The database has an object who's sha1 doesn't match the
131128
database value.

Documentation/git-gc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ how long records of conflicted merge you have not resolved are
107107
kept. This defaults to 15 days.
108108

109109
The optional configuration variable 'gc.packrefs' determines if
110-
'git gc' runs 'git pack-refs'. This can be set to "nobare" to enable
110+
'git gc' runs 'git pack-refs'. This can be set to "notbare" to enable
111111
it within all non-bare repos or it can be set to a boolean value.
112112
This defaults to true.
113113

gitweb/gitweb.perl

Lines changed: 47 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3479,6 +3479,51 @@ sub get_page_title {
34793479
return $title;
34803480
}
34813481

3482+
sub print_feed_meta {
3483+
if (defined $project) {
3484+
my %href_params = get_feed_info();
3485+
if (!exists $href_params{'-title'}) {
3486+
$href_params{'-title'} = 'log';
3487+
}
3488+
3489+
foreach my $format qw(RSS Atom) {
3490+
my $type = lc($format);
3491+
my %link_attr = (
3492+
'-rel' => 'alternate',
3493+
'-title' => esc_attr("$project - $href_params{'-title'} - $format feed"),
3494+
'-type' => "application/$type+xml"
3495+
);
3496+
3497+
$href_params{'action'} = $type;
3498+
$link_attr{'-href'} = href(%href_params);
3499+
print "<link ".
3500+
"rel=\"$link_attr{'-rel'}\" ".
3501+
"title=\"$link_attr{'-title'}\" ".
3502+
"href=\"$link_attr{'-href'}\" ".
3503+
"type=\"$link_attr{'-type'}\" ".
3504+
"/>\n";
3505+
3506+
$href_params{'extra_options'} = '--no-merges';
3507+
$link_attr{'-href'} = href(%href_params);
3508+
$link_attr{'-title'} .= ' (no merges)';
3509+
print "<link ".
3510+
"rel=\"$link_attr{'-rel'}\" ".
3511+
"title=\"$link_attr{'-title'}\" ".
3512+
"href=\"$link_attr{'-href'}\" ".
3513+
"type=\"$link_attr{'-type'}\" ".
3514+
"/>\n";
3515+
}
3516+
3517+
} else {
3518+
printf('<link rel="alternate" title="%s projects list" '.
3519+
'href="%s" type="text/plain; charset=utf-8" />'."\n",
3520+
esc_attr($site_name), href(project=>undef, action=>"project_index"));
3521+
printf('<link rel="alternate" title="%s projects feeds" '.
3522+
'href="%s" type="text/x-opml" />'."\n",
3523+
esc_attr($site_name), href(project=>undef, action=>"opml"));
3524+
}
3525+
}
3526+
34823527
sub git_header_html {
34833528
my $status = shift || "200 OK";
34843529
my $expires = shift;
@@ -3528,48 +3573,8 @@ sub git_header_html {
35283573
print '<link rel="stylesheet" type="text/css" href="'.esc_url($stylesheet).'"/>'."\n";
35293574
}
35303575
}
3531-
if (defined $project) {
3532-
my %href_params = get_feed_info();
3533-
if (!exists $href_params{'-title'}) {
3534-
$href_params{'-title'} = 'log';
3535-
}
3536-
3537-
foreach my $format qw(RSS Atom) {
3538-
my $type = lc($format);
3539-
my %link_attr = (
3540-
'-rel' => 'alternate',
3541-
'-title' => esc_attr("$project - $href_params{'-title'} - $format feed"),
3542-
'-type' => "application/$type+xml"
3543-
);
3544-
3545-
$href_params{'action'} = $type;
3546-
$link_attr{'-href'} = href(%href_params);
3547-
print "<link ".
3548-
"rel=\"$link_attr{'-rel'}\" ".
3549-
"title=\"$link_attr{'-title'}\" ".
3550-
"href=\"$link_attr{'-href'}\" ".
3551-
"type=\"$link_attr{'-type'}\" ".
3552-
"/>\n";
3553-
3554-
$href_params{'extra_options'} = '--no-merges';
3555-
$link_attr{'-href'} = href(%href_params);
3556-
$link_attr{'-title'} .= ' (no merges)';
3557-
print "<link ".
3558-
"rel=\"$link_attr{'-rel'}\" ".
3559-
"title=\"$link_attr{'-title'}\" ".
3560-
"href=\"$link_attr{'-href'}\" ".
3561-
"type=\"$link_attr{'-type'}\" ".
3562-
"/>\n";
3563-
}
3564-
3565-
} else {
3566-
printf('<link rel="alternate" title="%s projects list" '.
3567-
'href="%s" type="text/plain; charset=utf-8" />'."\n",
3568-
esc_attr($site_name), href(project=>undef, action=>"project_index"));
3569-
printf('<link rel="alternate" title="%s projects feeds" '.
3570-
'href="%s" type="text/x-opml" />'."\n",
3571-
esc_attr($site_name), href(project=>undef, action=>"opml"));
3572-
}
3576+
print_feed_meta()
3577+
if ($status eq '200 OK');
35733578
if (defined $favicon) {
35743579
print qq(<link rel="shortcut icon" href=").esc_url($favicon).qq(" type="image/png" />\n);
35753580
}

trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "cache.h"
2626
#include "quote.h"
2727

28-
void do_nothing(size_t unused)
28+
static void do_nothing(size_t unused)
2929
{
3030
}
3131

userdiff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ PATTERNS("python", "^[ \t]*((class|def)[ \t].*)$",
7474
"[a-zA-Z_][a-zA-Z0-9_]*"
7575
"|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?"
7676
"|[-+*/<>%&^|=!]=|//=?|<<=?|>>=?|\\*\\*=?"
77-
"|[^[:space:]|[\x80-\xff]+"),
77+
"|[^[:space:]]|[\x80-\xff]+"),
7878
/* -- */
7979
PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$",
8080
/* -- */
8181
"(@|@@|\\$)?[a-zA-Z_][a-zA-Z0-9_]*"
8282
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?."
8383
"|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"
84-
"|[^[:space:]|[\x80-\xff]+"),
84+
"|[^[:space:]]|[\x80-\xff]+"),
8585
PATTERNS("bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$",
8686
"[={}\"]|[^={}\" \t]+"),
8787
PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$",

0 commit comments

Comments
 (0)