Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  post-receive-email: fix accidental removal of a trailing space in signature line
  Escape project names before creating pathinfo URLs
  Escape project name in regexp
  bash: Add completion for git diff --base --ours --theirs
  diff-options.txt: document the new "--dirstat" option
  • Loading branch information
Junio C Hamano committed Apr 22, 2008
2 parents 799596a + 71bd81a commit bdb87af
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Documentation/diff-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ endif::git-format-patch[]
number of modified files, as well as number of added and deleted
lines.

--dirstat[=limit]::
Output only the sub-directories that are impacted by a diff,
and to what degree they are impacted. You can override the
default cut-off in percent (3) by "--dirstat=limit". If you
want to enable "cumulative" directory statistics, you can use
the "--cumulative" flag, which adds up percentages recursively
even when they have been already reported for a sub-directory.

--summary::
Output a condensed summary of extended header information
such as creations, renames and mode changes.
Expand Down
1 change: 1 addition & 0 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ _git_diff ()
--ignore-all-space --exit-code --quiet --ext-diff
--no-ext-diff
--no-prefix --src-prefix= --dst-prefix=
--base --ours --theirs
"
return
;;
Expand Down
3 changes: 2 additions & 1 deletion contrib/hooks/post-receive-email
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,12 @@ generate_email_header()

generate_email_footer()
{
SPACE=" "
cat <<-EOF
hooks/post-receive
--
--${SPACE}
$projectdesc
EOF
}
Expand Down
6 changes: 3 additions & 3 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ sub evaluate_path_info {
}
# do not change any parameters if an action is given using the query string
return if $action;
$path_info =~ s,^$project/*,,;
$path_info =~ s,^\Q$project\E/*,,;
my ($refname, $pathname) = split(/:/, $path_info, 2);
if (defined $pathname) {
# we got "project.git/branch:filename" or "project.git/branch:dir/"
Expand Down Expand Up @@ -633,7 +633,7 @@ (%)
my ($use_pathinfo) = gitweb_check_feature('pathinfo');
if ($use_pathinfo) {
# use PATH_INFO for project name
$href .= "/$params{'project'}" if defined $params{'project'};
$href .= "/".esc_url($params{'project'}) if defined $params{'project'};
delete $params{'project'};

# Summary just uses the project path URL
Expand Down Expand Up @@ -2575,7 +2575,7 @@ sub git_header_html {
my $action = $my_uri;
my ($use_pathinfo) = gitweb_check_feature('pathinfo');
if ($use_pathinfo) {
$action .= "/$project";
$action .= "/".esc_url($project);
} else {
$cgi->param("p", $project);
}
Expand Down

0 comments on commit bdb87af

Please sign in to comment.