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
Kazuhiko Shiozaki
gitlab-ce
Commits
3b7c2adf
Commit
3b7c2adf
authored
Nov 22, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add diff format to commit#show
parent
246faa3d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
app/controllers/commit_controller.rb
app/controllers/commit_controller.rb
+1
-0
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+1
-0
No files found.
app/controllers/commit_controller.rb
View file @
3b7c2adf
...
@@ -26,6 +26,7 @@ class CommitController < ProjectResourceController
...
@@ -26,6 +26,7 @@ class CommitController < ProjectResourceController
end
end
end
end
format
.
diff
{
render
text:
@commit
.
to_diff
}
format
.
patch
{
render
text:
@commit
.
to_patch
}
format
.
patch
{
render
text:
@commit
.
to_patch
}
end
end
end
end
...
...
spec/routing/project_routing_spec.rb
View file @
3b7c2adf
...
@@ -285,6 +285,7 @@ end
...
@@ -285,6 +285,7 @@ end
describe
CommitController
,
"routing"
do
describe
CommitController
,
"routing"
do
it
"to #show"
do
it
"to #show"
do
get
(
"/gitlabhq/commit/4246fb"
).
should
route_to
(
'commit#show'
,
project_id:
'gitlabhq'
,
id:
'4246fb'
)
get
(
"/gitlabhq/commit/4246fb"
).
should
route_to
(
'commit#show'
,
project_id:
'gitlabhq'
,
id:
'4246fb'
)
get
(
"/gitlabhq/commit/4246fb.diff"
).
should
route_to
(
'commit#show'
,
project_id:
'gitlabhq'
,
id:
'4246fb'
,
format:
'diff'
)
get
(
"/gitlabhq/commit/4246fb.patch"
).
should
route_to
(
'commit#show'
,
project_id:
'gitlabhq'
,
id:
'4246fb'
,
format:
'patch'
)
get
(
"/gitlabhq/commit/4246fb.patch"
).
should
route_to
(
'commit#show'
,
project_id:
'gitlabhq'
,
id:
'4246fb'
,
format:
'patch'
)
get
(
"/gitlabhq/commit/4246fbd13872934f72a8fd0d6fb1317b47b59cb5"
).
should
route_to
(
'commit#show'
,
project_id:
'gitlabhq'
,
id:
'4246fbd13872934f72a8fd0d6fb1317b47b59cb5'
)
get
(
"/gitlabhq/commit/4246fbd13872934f72a8fd0d6fb1317b47b59cb5"
).
should
route_to
(
'commit#show'
,
project_id:
'gitlabhq'
,
id:
'4246fbd13872934f72a8fd0d6fb1317b47b59cb5'
)
end
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