gitweb cleanup: Move @diff_opts declaration earlier
Move @diff_opts declaration earlier, so that all gitweb options are together (and not separated by %feature hash and some subroutines), with the exception of $GITWEB_CONFIG which must be after all option variables including %feature hash. While at it, in the moved comment, note that diff option '-C' implies '-M', instead of suggesting that '-M', '-C' is required. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski committed
Jul 20, 2007 at 02:15 UTC
69a9b41c15f25e1e91df5d9c4d5e3d56706f8f0e
1 file changed
+10
-10
gitweb/gitweb.perl
+10
-10
@@ -104,6 +104,16 @@ our $mimetypes_file = undef;
104
# could be even 'utf-8' for the old behavior)
105
our $fallback_encoding = 'latin1';
106
107
+# rename detection options for git-diff and git-diff-tree
108
+# - default is '-M', with the cost proportional to
109
+# (number of removed files) * (number of new files).
110
+# - more costly is '-C' (which implies '-M'), with the cost proportional to
111
+# (number of changed files + number of removed files) * (number of new files)
112
+# - even more costly is '-C', '--find-copies-harder' with cost
113
+# (number of files in the original tree) * (number of new files)
114
+# - one might want to include '-B' option, e.g. '-B', '-M'
115
+our @diff_opts = ('-M'); # taken from git_commit
116
+
117
# You define site-wide feature defaults here; override them with
118
# $GITWEB_CONFIG as necessary.
119
our %feature = (
@@ -310,16 +320,6 @@ sub check_export_ok {
320
(!$export_ok || -e "$dir/$export_ok"));
321
}
322
313
-# rename detection options for git-diff and git-diff-tree
314
-# - default is '-M', with the cost proportional to
315
-# (number of removed files) * (number of new files).
316
-# - more costly is '-C' (or '-C', '-M'), with the cost proportional to
317
-# (number of changed files + number of removed files) * (number of new files)
318
-# - even more costly is '-C', '--find-copies-harder' with cost
319
-# (number of files in the original tree) * (number of new files)
320
-# - one might want to include '-B' option, e.g. '-B', '-M'
321
-our @diff_opts = ('-M'); # taken from git_commit
322
-
323
our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
324
do $GITWEB_CONFIG if -e $GITWEB_CONFIG;
325