Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e2576d58
Commit
e2576d58
authored
9 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid unnecessary usage of local vars
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
0d967bce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
app/views/projects/diffs/_diffs.html.haml
app/views/projects/diffs/_diffs.html.haml
+1
-4
app/views/projects/diffs/_stats.html.haml
app/views/projects/diffs/_stats.html.haml
+2
-2
No files found.
app/views/projects/diffs/_diffs.html.haml
View file @
e2576d58
...
...
@@ -8,10 +8,7 @@
.btn-group
=
inline_diff_btn
=
parallel_diff_btn
-
additions
=
diff_files
.
sum
(
&
:added_lines
)
-
deletions
=
diff_files
.
sum
(
&
:removed_lines
)
=
render
'projects/diffs/stats'
,
diff_files:
diff_files
,
additions:
additions
,
deletions:
deletions
=
render
'projects/diffs/stats'
,
diff_files:
diff_files
-
if
diff_files
.
count
<
diffs
.
size
=
render
'projects/diffs/warning'
,
diffs:
diffs
,
shown_files_count:
diff_files
.
count
...
...
This diff is collapsed.
Click to expand it.
app/views/projects/diffs/_stats.html.haml
View file @
e2576d58
...
...
@@ -4,9 +4,9 @@
=
link_to
'#'
,
class:
'js-toggle-button'
do
%strong
#{
pluralize
(
diff_files
.
count
,
"changed file"
)
}
with
%strong
.cgreen
#{
additions
}
additions
%strong
.cgreen
#{
diff_files
.
sum
(
&
:added_lines
)
}
additions
and
%strong
.cred
#{
d
eletions
}
deletions
%strong
.cred
#{
d
iff_files
.
sum
(
&
:removed_lines
)
}
deletions
.file-stats.js-toggle-content.hide
%ul
-
diff_files
.
each_with_index
do
|
diff_file
,
i
|
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment