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
Boxiang Sun
gitlab-ce
Commits
caa06567
Commit
caa06567
authored
May 16, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #825 from demelziraptor/master
View project pages without master branch
parents
1b85cbc6
e5bbefc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/commit.rb
app/models/commit.rb
+2
-2
app/models/project/repository_trait.rb
app/models/project/repository_trait.rb
+1
-1
No files found.
app/models/commit.rb
View file @
caa06567
...
...
@@ -23,11 +23,11 @@ class Commit
class
<<
self
def
find_or_first
(
repo
,
commit_id
=
nil
)
def
find_or_first
(
repo
,
commit_id
=
nil
,
root_ref
)
commit
=
if
commit_id
repo
.
commit
(
commit_id
)
else
repo
.
commits
.
first
repo
.
commits
(
root_ref
)
.
first
end
Commit
.
new
(
commit
)
if
commit
end
...
...
app/models/project/repository_trait.rb
View file @
caa06567
...
...
@@ -8,7 +8,7 @@ module Project::RepositoryTrait
end
def
commit
(
commit_id
=
nil
)
Commit
.
find_or_first
(
repo
,
commit_id
)
Commit
.
find_or_first
(
repo
,
commit_id
,
root_ref
)
end
def
fresh_commits
(
n
=
10
)
...
...
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