remove [basic]show_ignore_space_change_link option...
.... and enable this feature on in...
... | ... |
@@ -3,6 +3,8 @@ |
3 | 3 |
- use own temparaly directory when creating repositoy with readme file. Now not use /tmp. |
4 | 4 |
- add Mojolicious::Plugin::DBViewer to cpanfile |
5 | 5 |
- X-Forwarded-HTTPS header is DEPRECATED! use X-Forwarded-Proto header instead. |
6 |
+ - remove [basic]show_ignore_space_change_link option. |
|
7 |
+ and enable this feature on in project settings page. |
|
6 | 8 |
1.12 (7 Feb 2016) |
7 | 9 |
- Catch up latest Github design. |
8 | 10 |
- Fix bug that relative image path in README.md and blob html. |
... | ... |
@@ -442,7 +442,7 @@ If you install perl 5.10.1+ by perlbrew, you can install latest GitPrep. |
442 | 442 |
|
443 | 443 |
### I know information about GitPrep 2.0 upgrading. |
444 | 444 |
|
445 |
-1. X-Forwarded-HTTPS header is deprecated. use X-Forwarded-Proto header. |
|
445 |
+**1. X-Forwarded-HTTPS header is deprecated. use X-Forwarded-Proto header.** |
|
446 | 446 |
|
447 | 447 |
# This is deprecated in GitPrep 2.0 |
448 | 448 |
RequestHeader set X-Forwarded-HTTPS "1" |
... | ... |
@@ -450,6 +450,17 @@ If you install perl 5.10.1+ by perlbrew, you can install latest GitPrep. |
450 | 450 |
# Use X-Forwarded-Proto instead |
451 | 451 |
RequestHeader set X-Forwarded-Proto "https" |
452 | 452 |
|
453 |
+**2. remove [basic]show_ignore_space_change_link option** |
|
454 |
+ |
|
455 |
+remove [basic]show_ignore_space_change_link option. |
|
456 |
+but enable this feature on in project settings page. |
|
457 |
+ |
|
458 |
+ # Go to settings page in your project |
|
459 |
+ /kimoto/gitprep/settings |
|
460 |
+ |
|
461 |
+ # And see the following section |
|
462 |
+ Ignore space change in diff |
|
463 |
+ |
|
453 | 464 |
## For Developer |
454 | 465 |
|
455 | 466 |
If you are a developer, you can start the application in development mode. |
... | ... |
@@ -25,17 +25,14 @@ |
25 | 25 |
;time_zone=+10:30 |
26 | 26 |
;time_zone=-4:00 |
27 | 27 |
|
28 |
-;;; Suspects encoding list for source code character encoding (default:UTF-8) |
|
29 |
-;;; set comma separated encoding list if your source code is different from UTF-8. |
|
30 |
-;;; encoding name follow Perl encoding API. |
|
31 |
-;encoding_suspects=cp932,UTF-8 |
|
32 |
- |
|
33 | 28 |
;;; authorized_keys file for public key authentication via ssh. |
34 | 29 |
;;; default is "$ENV{HOME}/.ssh/authorized_keys" |
35 | 30 |
; authorized_keys_file=/home/gitprep/.ssh/authorized_keys |
36 | 31 |
|
37 |
-;;; Show ignore space change link, default to 0 |
|
38 |
-; show_ignore_space_change_link=1 |
|
32 |
+;;; Suspects encoding list for source code character encoding (default:UTF-8) |
|
33 |
+;;; set comma separated encoding list if your source code is different from UTF-8. |
|
34 |
+;;; encoding name follow Perl encoding API. |
|
35 |
+;encoding_suspects=cp932,UTF-8 |
|
39 | 36 |
|
40 | 37 |
[admin] |
41 | 38 |
;;; If you forget admin password, |
... | ... |
@@ -376,7 +376,8 @@ EOS |
376 | 376 |
"default_branch not null default 'master'", |
377 | 377 |
"original_user not null default ''", |
378 | 378 |
"original_pid integer not null default 0", |
379 |
- "private not null default 0" |
|
379 |
+ "private not null default 0", |
|
380 |
+ "ignore_space_change not null default 0" |
|
380 | 381 |
]; |
381 | 382 |
for my $column (@$project_columns) { |
382 | 383 |
eval { $dbi->execute("alter table project add column $column") }; |
... | ... |
@@ -276,11 +276,6 @@ |
276 | 276 |
%= hidden_field branch => $bname; |
277 | 277 |
</form> |
278 | 278 |
% } |
279 |
- % if (app->config->{basic}{show_ignore_space_change_link}) { |
|
280 |
- (<a style="font-size:90%;color:#9999FF" href="<%= url_for("/$user/$project/compare/$default_branch->{name}...$bname?w=") %>"> |
|
281 |
- ignore space |
|
282 |
- </a>) |
|
283 |
- % } |
|
284 | 279 |
% } |
285 | 280 |
</li> |
286 | 281 |
</ul> |
... | ... |
@@ -73,7 +73,6 @@ |
73 | 73 |
<div> |
74 | 74 |
% for (my $i = 1; $i < @{$commit->{comment}}; $i++) { |
75 | 75 |
<div> |
76 |
- % warn $commit->{comment}[$i]; |
|
77 | 76 |
<%= $commit->{comment}[$i] %> |
78 | 77 |
</div> |
79 | 78 |
% } |
... | ... |
@@ -138,11 +138,6 @@ |
138 | 138 |
<a href="<%= url_for("/$user/$project/commit/$commit->{id}") %>"> |
139 | 139 |
<b><%= $commit->{title_short} %></b> |
140 | 140 |
</a> |
141 |
- % if (app->config->{basic}{show_ignore_space_change_link}) { |
|
142 |
- (<a href="<%= url_for("/$user/$project/commit/$commit->{id}?w=") %>"> |
|
143 |
- ignore space |
|
144 |
- </a>) |
|
145 |
- % } |
|
146 | 141 |
</div> |
147 | 142 |
<div class="commit-left-author"> |
148 | 143 |
<span title="<%= $commit->{author_email} %>"><%= $commit->{author_name} %></span> |
... | ... |
@@ -4,7 +4,16 @@ |
4 | 4 |
my $from_rev = stash('from_rev'); |
5 | 5 |
|
6 | 6 |
my $param_ignore_space_change = param('w'); |
7 |
- my $ignore_space_change = defined $param_ignore_space_change; |
|
7 |
+ my $ignore_space_change; |
|
8 |
+ if ($param_ignore_space_change) { |
|
9 |
+ $ignore_space_change = 1; |
|
10 |
+ } |
|
11 |
+ else { |
|
12 |
+ $ignore_space_change = app->dbi->model('project')->select( |
|
13 |
+ 'ignore_space_change', |
|
14 |
+ where => {user_id => $user, name => $project} |
|
15 |
+ )->value; |
|
16 |
+ } |
|
8 | 17 |
|
9 | 18 |
# Git |
10 | 19 |
my $git = app->git; |
... | ... |
@@ -55,11 +55,6 @@ |
55 | 55 |
<a href="<%= url_for("/$user/$project/commit/$commit->{id}") %>"> |
56 | 56 |
<%= $commit->{title_short} %> |
57 | 57 |
</a> |
58 |
- % if (app->config->{basic}{show_ignore_space_change_link}) { |
|
59 |
- (<a href="<%= url_for("/$user/$project/commit/$commit->{id}?w=") %>"> |
|
60 |
- ignore space |
|
61 |
- </a>) |
|
62 |
- % } |
|
63 | 58 |
</div> |
64 | 59 |
<div class="file-list-age"> |
65 | 60 |
<span title="<%= $commit->{age_string_datetime_local} %>"><%= $commit->{age_string} %></span> |
... | ... |
@@ -78,6 +78,8 @@ |
78 | 78 |
# Parameters |
79 | 79 |
my $default_branch = param('default-branch'); |
80 | 80 |
my $private = param('private'); |
81 |
+ my $ignore_space_change = param('ignore_space_change'); |
|
82 |
+ |
|
81 | 83 |
my $params = {}; |
82 | 84 |
if (defined $default_branch) { |
83 | 85 |
$params->{default_branch} = $default_branch; |
... | ... |
@@ -85,6 +87,9 @@ |
85 | 87 |
if (defined $private) { |
86 | 88 |
$params->{private} = $private ? 1 : 0; |
87 | 89 |
}; |
90 |
+ if (defined $ignore_space_change) { |
|
91 |
+ $params->{ignore_space_change} = $ignore_space_change ? 1 : 0; |
|
92 |
+ } |
|
88 | 93 |
|
89 | 94 |
my $dbi = app->dbi; |
90 | 95 |
eval { |
... | ... |
@@ -234,8 +239,22 @@ |
234 | 239 |
% if ($private) { |
235 | 240 |
% param('private', 1); |
236 | 241 |
% } |
242 |
+ %= hidden_field 'private' => 0; |
|
237 | 243 |
%= check_box 'private' => 1; |
238 | 244 |
</li> |
245 |
+ <li> |
|
246 |
+ <% |
|
247 |
+ my $ignore_space_change = app->dbi->model('project')->select( |
|
248 |
+ 'ignore_space_change', |
|
249 |
+ where => {user_id => $user, name => $project} |
|
250 |
+ )->value; |
|
251 |
+ my @checked = $ignore_space_change ? (checked => undef) : (); |
|
252 |
+ %> |
|
253 |
+ <span>Ignore space change in diff</span> |
|
254 |
+ |
|
255 |
+ %= hidden_field 'ignore_space_change' => 0; |
|
256 |
+ %= check_box 'ignore_space_change' => 1, @checked; |
|
257 |
+ </li> |
|
239 | 258 |
<li> |
240 | 259 |
<input type="submit" class="btn" value="Save"> |
241 | 260 |
</li> |
... | ... |
@@ -57,11 +57,6 @@ |
57 | 57 |
<i class="icon-share-alt"></i> |
58 | 58 |
<%= substr($commit_id, 0, 7) %> |
59 | 59 |
</a> |
60 |
- % if (app->config->{basic}{show_ignore_space_change_link}) { |
|
61 |
- (<a style="font-size:90%;color:#9999FF" href="<%= url_for("/$user/$project/commit/$commit_id?w=") %>"> |
|
62 |
- ignore space |
|
63 |
- </a>) |
|
64 |
- % } |
|
65 | 60 |
<a href="<%= url_for("/$user/$project/archive/$name.zip") %>"> |
66 | 61 |
<i class="icon-file"></i> |
67 | 62 |
zip |