BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
bc648ae5
Commit
bc648ae5
authored
Aug 07, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gitlab-git-repository-log-options' into 'master'
Set default options outside the raw_log method See merge request !13346
parents
33bcfbf8
f278e5fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
repository.rb
lib/gitlab/git/repository.rb
+15
-14
No files found.
lib/gitlab/git/repository.rb
View file @
bc648ae5
...
...
@@ -299,6 +299,21 @@ module Gitlab
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/446
def
log
(
options
)
default_options
=
{
limit:
10
,
offset:
0
,
path:
nil
,
follow:
false
,
skip_merges:
false
,
disable_walk:
false
,
after:
nil
,
before:
nil
}
options
=
default_options
.
merge
(
options
)
options
[
:limit
]
||=
0
options
[
:offset
]
||=
0
raw_log
(
options
).
map
{
|
c
|
Commit
.
decorate
(
c
)
}
end
...
...
@@ -712,20 +727,6 @@ module Gitlab
end
def
raw_log
(
options
)
default_options
=
{
limit:
10
,
offset:
0
,
path:
nil
,
follow:
false
,
skip_merges:
false
,
disable_walk:
false
,
after:
nil
,
before:
nil
}
options
=
default_options
.
merge
(
options
)
options
[
:limit
]
||=
0
options
[
:offset
]
||=
0
actual_ref
=
options
[
:ref
]
||
root_ref
begin
sha
=
sha_from_ref
(
actual_ref
)
...
...
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