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
46d5760c
Commit
46d5760c
authored
Jun 03, 2016
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fewer silly instance variables
parent
50a357d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
app/controllers/projects/git_http_controller.rb
app/controllers/projects/git_http_controller.rb
+9
-11
No files found.
app/controllers/projects/git_http_controller.rb
View file @
46d5760c
...
...
@@ -88,17 +88,6 @@ class Projects::GitHttpController < Projects::ApplicationController
[
nil
,
nil
]
end
def
repository
@repository
||=
begin
_
,
suffix
=
project_id_with_suffix
if
suffix
==
'.wiki.git'
project
.
wiki
.
repository
else
project
.
repository
end
end
end
def
upload_pack?
git_command
==
'git-upload-pack'
end
...
...
@@ -119,6 +108,15 @@ class Projects::GitHttpController < Projects::ApplicationController
render
json:
Gitlab
::
Workhorse
.
git_http_ok
(
repository
,
user
)
end
def
repository
_
,
suffix
=
project_id_with_suffix
if
suffix
==
'.wiki.git'
project
.
wiki
.
repository
else
project
.
repository
end
end
def
render_not_found
render
text:
'Not Found'
,
status: :not_found
end
...
...
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