From 4be0c3522421329f255a1cd9021ee86519f00f96 Mon Sep 17 00:00:00 2001 From: Jiang Xin Date: Thu, 16 Dec 2010 15:16:49 +0800 Subject: [PATCH 1/5] Fix typo in git-gc document. The variable gc.packrefs for git-gc can be set to true, false and "notbare", not "nobare". Signed-off-by: Jiang Xin Signed-off-by: Junio C Hamano --- Documentation/config.txt | 2 +- Documentation/git-gc.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 3fd4b626fa..4f1e979932 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -971,7 +971,7 @@ gc.packrefs:: Running `git pack-refs` in a repository renders it unclonable by Git versions prior to 1.5.1.2 over dumb transports such as HTTP. This variable determines whether - 'git gc' runs `git pack-refs`. This can be set to `nobare` + 'git gc' runs `git pack-refs`. This can be set to `notbare` to enable it within all non-bare repos or it can be set to a boolean value. The default is `true`. diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt index 315f07ef1c..a01eef6763 100644 --- a/Documentation/git-gc.txt +++ b/Documentation/git-gc.txt @@ -107,7 +107,7 @@ how long records of conflicted merge you have not resolved are kept. This defaults to 15 days. The optional configuration variable 'gc.packrefs' determines if -'git gc' runs 'git pack-refs'. This can be set to "nobare" to enable +'git gc' runs 'git pack-refs'. This can be set to "notbare" to enable it within all non-bare repos or it can be set to a boolean value. This defaults to true. From 8e8aa44057b1f92bad43a0bd3a2d448e9cb45b18 Mon Sep 17 00:00:00 2001 From: Vasyl' Vavrychuk Date: Fri, 17 Dec 2010 00:38:42 +0200 Subject: [PATCH 2/5] trace.c: mark file-local function static Signed-off-by: Vasyl' Vavrychuk Signed-off-by: Junio C Hamano --- trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace.c b/trace.c index 1e560cb0b9..62586fa371 100644 --- a/trace.c +++ b/trace.c @@ -25,7 +25,7 @@ #include "cache.h" #include "quote.h" -void do_nothing(size_t unused) +static void do_nothing(size_t unused) { } From b34f69f9916e52e742f35c2f88286375142260de Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sat, 18 Dec 2010 17:17:53 +0100 Subject: [PATCH 3/5] userdiff: fix typo in ruby and python word regexes Both had an unclosed ] that ruined the safeguard against not matching a non-space char. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- userdiff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userdiff.c b/userdiff.c index f9e05b548c..2d5453697a 100644 --- a/userdiff.c +++ b/userdiff.c @@ -74,14 +74,14 @@ PATTERNS("python", "^[ \t]*((class|def)[ \t].*)$", "[a-zA-Z_][a-zA-Z0-9_]*" "|[-+0-9.e]+[jJlL]?|0[xX]?[0-9a-fA-F]+[lL]?" "|[-+*/<>%&^|=!]=|//=?|<<=?|>>=?|\\*\\*=?" - "|[^[:space:]|[\x80-\xff]+"), + "|[^[:space:]]|[\x80-\xff]+"), /* -- */ PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$", /* -- */ "(@|@@|\\$)?[a-zA-Z_][a-zA-Z0-9_]*" "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?." "|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~" - "|[^[:space:]|[\x80-\xff]+"), + "|[^[:space:]]|[\x80-\xff]+"), PATTERNS("bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$", "[={}\"]|[^={}\" \t]+"), PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$", From 0c806a06a311081ba02f60ffd2711853c1b9d6fc Mon Sep 17 00:00:00 2001 From: Mark Lodato Date: Sat, 18 Dec 2010 00:38:38 -0500 Subject: [PATCH 4/5] fsck docs: remove outdated and useless diagnostic In git-fsck(1), there was a reference to the warning " has full pathnames in it". This exact wording has not been used since 2005 (commit f1f0d0889e55), when the wording was changed slightly. More importantly, the description of that warning was useless, and there were many other similar warning messages which were not document at all. Since all these warnings are fairly obvious, there is no need for them to be in the man page. Signed-off-by: Mark Lodato Signed-off-by: Junio C Hamano --- Documentation/git-fsck.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/git-fsck.txt b/Documentation/git-fsck.txt index 3ad48a6336..86f9b2bf91 100644 --- a/Documentation/git-fsck.txt +++ b/Documentation/git-fsck.txt @@ -123,9 +123,6 @@ dangling :: The object , is present in the database but never 'directly' used. A dangling commit could be a root node. -warning: git-fsck: tree has full pathnames in it:: - And it shouldn't... - sha1 mismatch :: The database has an object who's sha1 doesn't match the database value. From 05bb5a2584ca0e1c87a2135a83c5573b9337d06f Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Sat, 18 Dec 2010 21:02:13 +0100 Subject: [PATCH 5/5] gitweb: Include links to feeds in HTML header only for '200 OK' response To do that, generating ""s to feeds were refactored into print_feed_meta() subroutine, to keep nesting (indent) level in git_header_html() low. This has also the advantage of making code more clear. Signed-off-by: Jakub Narebski Signed-off-by: John 'Warthog9' Hawley Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 89 ++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 53253c622d..42cc1da7ff 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3394,6 +3394,51 @@ sub get_page_title { return $title; } +sub print_feed_meta { + if (defined $project) { + my %href_params = get_feed_info(); + if (!exists $href_params{'-title'}) { + $href_params{'-title'} = 'log'; + } + + foreach my $format qw(RSS Atom) { + my $type = lc($format); + my %link_attr = ( + '-rel' => 'alternate', + '-title' => esc_attr("$project - $href_params{'-title'} - $format feed"), + '-type' => "application/$type+xml" + ); + + $href_params{'action'} = $type; + $link_attr{'-href'} = href(%href_params); + print "\n"; + + $href_params{'extra_options'} = '--no-merges'; + $link_attr{'-href'} = href(%href_params); + $link_attr{'-title'} .= ' (no merges)'; + print "\n"; + } + + } else { + printf(''."\n", + esc_attr($site_name), href(project=>undef, action=>"project_index")); + printf(''."\n", + esc_attr($site_name), href(project=>undef, action=>"opml")); + } +} + sub git_header_html { my $status = shift || "200 OK"; my $expires = shift; @@ -3443,48 +3488,8 @@ EOF print ''."\n"; } } - if (defined $project) { - my %href_params = get_feed_info(); - if (!exists $href_params{'-title'}) { - $href_params{'-title'} = 'log'; - } - - foreach my $format qw(RSS Atom) { - my $type = lc($format); - my %link_attr = ( - '-rel' => 'alternate', - '-title' => esc_attr("$project - $href_params{'-title'} - $format feed"), - '-type' => "application/$type+xml" - ); - - $href_params{'action'} = $type; - $link_attr{'-href'} = href(%href_params); - print "\n"; - - $href_params{'extra_options'} = '--no-merges'; - $link_attr{'-href'} = href(%href_params); - $link_attr{'-title'} .= ' (no merges)'; - print "\n"; - } - - } else { - printf(''."\n", - esc_attr($site_name), href(project=>undef, action=>"project_index")); - printf(''."\n", - esc_attr($site_name), href(project=>undef, action=>"opml")); - } + print_feed_meta() + if ($status eq '200 OK'); if (defined $favicon) { print qq(\n); }