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
Léo-Paul Géneau
gitlab-ce
Commits
176b60d1
Commit
176b60d1
authored
Jan 04, 2018
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the Project#repo method
parent
1e950e31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+1
-1
app/models/project.rb
app/models/project.rb
+1
-5
No files found.
app/controllers/projects_controller.rb
View file @
176b60d1
...
@@ -353,7 +353,7 @@ class ProjectsController < Projects::ApplicationController
...
@@ -353,7 +353,7 @@ class ProjectsController < Projects::ApplicationController
end
end
def
repo_exists?
def
repo_exists?
project
.
repository_exists?
&&
!
project
.
empty_repo?
&&
project
.
repo
project
.
repository_exists?
&&
!
project
.
empty_repo?
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
project
.
repository
.
expire_exists_cache
project
.
repository
.
expire_exists_cache
...
...
app/models/project.rb
View file @
176b60d1
...
@@ -992,10 +992,6 @@ class Project < ActiveRecord::Base
...
@@ -992,10 +992,6 @@ class Project < ActiveRecord::Base
false
false
end
end
def
repo
repository
.
rugged
end
def
url_to_repo
def
url_to_repo
gitlab_shell
.
url_to_repo
(
full_path
)
gitlab_shell
.
url_to_repo
(
full_path
)
end
end
...
@@ -1438,7 +1434,7 @@ class Project < ActiveRecord::Base
...
@@ -1438,7 +1434,7 @@ class Project < ActiveRecord::Base
# We'd need to keep track of project full path otherwise directory tree
# We'd need to keep track of project full path otherwise directory tree
# created with hashed storage enabled cannot be usefully imported using
# created with hashed storage enabled cannot be usefully imported using
# the import rake task.
# the import rake task.
repo
.
config
[
'gitlab.fullpath'
]
=
gl_full_path
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]
=
gl_full_path
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
=>
e
rescue
Gitlab
::
Git
::
Repository
::
NoRepository
=>
e
Rails
.
logger
.
error
(
"Error writing to .git/config for project
#{
full_path
}
(
#{
id
}
):
#{
e
.
message
}
."
)
Rails
.
logger
.
error
(
"Error writing to .git/config for project
#{
full_path
}
(
#{
id
}
):
#{
e
.
message
}
."
)
nil
nil
...
...
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