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
853ca746
Commit
853ca746
authored
Aug 01, 2012
by
Nihad Abbasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo according to docs and tests
parent
00b280c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
lib/api/projects.rb
lib/api/projects.rb
+7
-7
No files found.
lib/api/projects.rb
View file @
853ca746
...
...
@@ -37,11 +37,11 @@ module Gitlab
#
# Parameters:
# id (required) - The ID or code name of a project
# branch
_id
(required) - The name of the branch
# branch (required) - The name of the branch
# Example Request:
# GET /projects/:id/repository/branches/:branch
_id
get
":id/repository/branches/:branch
_id
"
do
@branch
=
user_project
.
repo
.
heads
.
find
{
|
item
|
item
.
name
==
params
[
:branch
_id
]
}
# GET /projects/:id/repository/branches/:branch
get
":id/repository/branches/:branch"
do
@branch
=
user_project
.
repo
.
heads
.
find
{
|
item
|
item
.
name
==
params
[
:branch
]
}
present
@branch
,
:with
=>
Entities
::
RepoObject
end
...
...
@@ -148,7 +148,7 @@ module Gitlab
#
# Parameters:
# id (required) - The ID or code name of a project
# sha (required) - The commit or branch name
# sha (required) - The commit or branch name
# filepath (required) - The path to the file to display
# Example Request:
# GET /projects/:id/repository/commits/:sha/blob
...
...
@@ -157,10 +157,10 @@ module Gitlab
commit
=
user_project
.
commit
ref
error!
(
'404 Commit Not Found'
,
404
)
unless
commit
tree
=
Tree
.
new
commit
.
tree
,
user_project
,
ref
,
params
[
:filepath
]
error!
(
'404 File Not Found'
,
404
)
unless
tree
.
try
(
:tree
)
if
tree
.
text?
encoding
=
Gitlab
::
Encode
.
detect_encoding
(
tree
.
data
)
content_type
encoding
?
"text/plain; charset=
#{
encoding
}
"
:
"text/plain"
...
...
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