diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index d4661ddc2f..f52e8fa8bf 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -71,11 +71,11 @@ base-name::
--all::
This implies `--revs`. In addition to the list of
revision arguments read from the standard input, pretend
- as if all refs under `$GIT_DIR/refs` are specifed to be
+ as if all refs under `$GIT_DIR/refs` are specified to be
included.
---window and --depth::
- These two options affects how the objects contained in
+--window=[N], --depth=[N]::
+ These two options affect how the objects contained in
the pack are stored using delta compression. The
objects are first internally sorted by type, size and
optionally names and compared against the other objects
@@ -84,6 +84,7 @@ base-name::
it too deep affects the performance on the unpacker
side, because delta data needs to be applied that many
times to get to the necessary object.
+ The default value for both --window and --depth is 10.
--incremental::
This flag causes an object already in a pack ignored
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index 49f7e0a4a4..d2eaa0995d 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -57,13 +57,14 @@ OPTIONS
`git update-server-info`.
--window=[N], --depth=[N]::
- These two options affects how the objects contained in the pack are
+ These two options affect how the objects contained in the pack are
stored using delta compression. The objects are first internally
sorted by type, size and optionally names and compared against the
other objects within `--window` to see if using delta compression saves
space. `--depth` limits the maximum delta depth; making it too deep
affects the performance on the unpacker side, because delta data needs
to be applied that many times to get to the necessary object.
+ The default value for both --window and --depth is 10.
Author
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f848648788..c977111746 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -491,6 +491,12 @@ sub validate_refname {
return $input;
}
+# very thin wrapper for decode("utf8", $str, Encode::FB_DEFAULT);
+sub to_utf8 {
+ my $str = shift;
+ return decode("utf8", $str, Encode::FB_DEFAULT);
+}
+
# quote unsafe chars, but keep the slash, even when it's not
# correct, but quoted slashes look too horrible in bookmarks
sub esc_param {
@@ -513,7 +519,7 @@ sub esc_url {
# replace invalid utf8 character with SUBSTITUTION sequence
sub esc_html {
my $str = shift;
- $str = decode("utf8", $str, Encode::FB_DEFAULT);
+ $str = to_utf8($str);
$str = escapeHTML($str);
$str =~ s/\014/^L/g; # escape FORM FEED (FF) character (e.g. in COPYING file)
$str =~ s/\033/^[/g; # "escape" ESCAPE (\e) character (e.g. commit 20a3847d8a5032ce41f90dcc68abfb36e6fee9b1)
@@ -716,7 +722,7 @@ sub format_subject_html {
if (length($short) < length($long)) {
return $cgi->a({-href => $href, -class => "list subject",
- -title => decode("utf8", $long, Encode::FB_DEFAULT)},
+ -title => to_utf8($long)},
esc_html($short) . $extra);
} else {
return $cgi->a({-href => $href, -class => "list subject"},
@@ -891,7 +897,7 @@ sub git_get_projects_list {
if (check_export_ok("$projectroot/$path")) {
my $pr = {
path => $path,
- owner => decode("utf8", $owner, Encode::FB_DEFAULT),
+ owner => to_utf8($owner),
};
push @list, $pr
}
@@ -920,7 +926,7 @@ sub git_get_project_owner {
$pr = unescape($pr);
$ow = unescape($ow);
if ($pr eq $project) {
- $owner = decode("utf8", $ow, Encode::FB_DEFAULT);
+ $owner = to_utf8($ow);
last;
}
}
@@ -1282,7 +1288,7 @@ sub get_file_owner {
}
my $owner = $gcos;
$owner =~ s/[,;].*$//;
- return decode("utf8", $owner, Encode::FB_DEFAULT);
+ return to_utf8($owner);
}
## ......................................................................
@@ -3666,7 +3672,7 @@ XML
"\n";
}
print "
\n";
@@ -3675,7 +3681,7 @@ XML
next;
}
my $file = esc_html(unquote($7));
- $file = decode("utf8", $file, Encode::FB_DEFAULT);
+ $file = to_utf8($file);
print "$file
\n";
}
print "]]>\n" .