From: Junio C Hamano Date: Sun, 18 Jan 2009 07:06:19 +0000 (-0800) Subject: Merge branch 'gb/gitweb-patch' X-Git-Tag: v1.6.2-rc0~136 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6fc2a199699ec151a081301d53fbd324c95f47a7;p=git.git Merge branch 'gb/gitweb-patch' * gb/gitweb-patch: gitweb: link to patch(es) view in commit(diff) and (short)log view gitweb: add patches view gitweb: change call pattern for git_commitdiff gitweb: add patch view Conflicts: gitweb/gitweb.perl --- 6fc2a199699ec151a081301d53fbd324c95f47a7 diff --cc gitweb/gitweb.perl index 0ac84d1ad,8a8a32ac1..9a5cfb0cb --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@@ -388,6 -401,40 +403,16 @@@ sub feature_snapshot return @fmts; } -sub feature_grep { - my ($val) = git_get_project_config('grep', '--bool'); - - if ($val eq 'true') { - return (1); - } elsif ($val eq 'false') { - return (0); - } - - return ($_[0]); -} - -sub feature_pickaxe { - my ($val) = git_get_project_config('pickaxe', '--bool'); - - if ($val eq 'true') { - return (1); - } elsif ($val eq 'false') { - return (0); - } - - return ($_[0]); -} - + sub feature_patches { + my @val = (git_get_project_config('patches', '--int')); + + if (@val) { + return @val; + } + + return ($_[0]); + } + # checking HEAD file with -e is fragile if the repository was # initialized long time ago (i.e. symlink HEAD) and was pack-ref'ed # and then pruned.