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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
1924de91
Commit
1924de91
authored
Feb 29, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed compare for push
parent
f6f939ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/models/commit.rb
app/models/commit.rb
+4
-0
app/views/dashboard/_events_feed.html.haml
app/views/dashboard/_events_feed.html.haml
+2
-2
No files found.
app/models/commit.rb
View file @
1924de91
...
@@ -56,4 +56,8 @@ class Commit
...
@@ -56,4 +56,8 @@ class Commit
def
prev_commit
def
prev_commit
parents
.
first
parents
.
first
end
end
def
prev_commit_id
prev_commit
.
id
end
end
end
app/views/dashboard/_events_feed.html.haml
View file @
1924de91
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
=
time_ago_in_words
(
event
.
created_at
)
=
time_ago_in_words
(
event
.
created_at
)
ago.
ago.
-
if
event
.
commits
.
count
>
1
-
if
event
.
commits
.
count
>
1
=
link_to
compare_project_commits_path
(
event
.
project
,
:from
=>
event
.
commits
.
last
,
:to
=>
event
.
commits
.
first
)
do
=
link_to
compare_project_commits_path
(
event
.
project
,
:from
=>
event
.
commits
.
first
.
prev_commit_id
,
:to
=>
event
.
commits
.
last
.
id
)
do
Compare
#{
event
.
commits
.
last
.
id
[
0
..
8
]
}
...
#{
event
.
commits
.
fir
st
.
id
[
0
..
8
]
}
Compare
#{
event
.
commits
.
first
.
commit
.
id
[
0
..
8
]
}
...
#{
event
.
commits
.
la
st
.
id
[
0
..
8
]
}
-
@project
=
event
.
project
-
@project
=
event
.
project
%ul
.unstyled
%ul
.unstyled
=
render
event
.
commits
=
render
event
.
commits
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