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
b21539cc
Commit
b21539cc
authored
Aug 09, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose the raw_log method
parent
a281b1e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+17
-16
No files found.
lib/gitlab/git/repository.rb
View file @
b21539cc
...
...
@@ -324,6 +324,23 @@ module Gitlab
raw_log
(
options
).
map
{
|
c
|
Commit
.
decorate
(
self
,
c
)
}
end
# Used in gitaly-ruby
def
raw_log
(
options
)
actual_ref
=
options
[
:ref
]
||
root_ref
begin
sha
=
sha_from_ref
(
actual_ref
)
rescue
Rugged
::
OdbError
,
Rugged
::
InvalidError
,
Rugged
::
ReferenceError
# Return an empty array if the ref wasn't found
return
[]
end
if
log_using_shell?
(
options
)
log_by_shell
(
sha
,
options
)
else
log_by_walk
(
sha
,
options
)
end
end
def
count_commits
(
options
)
gitaly_migrate
(
:count_commits
)
do
|
is_enabled
|
if
is_enabled
...
...
@@ -733,22 +750,6 @@ module Gitlab
sort_branches
(
branches
,
sort_by
)
end
def
raw_log
(
options
)
actual_ref
=
options
[
:ref
]
||
root_ref
begin
sha
=
sha_from_ref
(
actual_ref
)
rescue
Rugged
::
OdbError
,
Rugged
::
InvalidError
,
Rugged
::
ReferenceError
# Return an empty array if the ref wasn't found
return
[]
end
if
log_using_shell?
(
options
)
log_by_shell
(
sha
,
options
)
else
log_by_walk
(
sha
,
options
)
end
end
def
log_using_shell?
(
options
)
options
[
:path
].
present?
||
options
[
:disable_walk
]
||
...
...
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