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
2545f6ad
Commit
2545f6ad
authored
Apr 17, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix following with multiple paths
`git log --follow` is only supported for a single path. CE doesn't currently pass multiple paths, but EE does.
parent
eeaeb275
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
repository.rb
app/models/repository.rb
+1
-1
repository_spec.rb
spec/models/repository_spec.rb
+21
-0
No files found.
app/models/repository.rb
View file @
2545f6ad
...
...
@@ -109,7 +109,7 @@ class Repository
offset:
offset
,
after:
after
,
before:
before
,
follow:
path
.
present?
,
follow:
Array
(
path
).
length
==
1
,
skip_merges:
skip_merges
}
...
...
spec/models/repository_spec.rb
View file @
2545f6ad
...
...
@@ -171,6 +171,27 @@ describe Repository, models: true do
end
end
describe
'#commits'
do
it
'sets follow when path is a single path'
do
expect
(
Gitlab
::
Git
::
Commit
).
to
receive
(
:where
).
with
(
a_hash_including
(
follow:
true
)).
and_call_original
.
twice
repository
.
commits
(
'master'
,
path:
'README.md'
)
repository
.
commits
(
'master'
,
path:
[
'README.md'
])
end
it
'does not set follow when path is multiple paths'
do
expect
(
Gitlab
::
Git
::
Commit
).
to
receive
(
:where
).
with
(
a_hash_including
(
follow:
false
)).
and_call_original
repository
.
commits
(
'master'
,
path:
[
'README.md'
,
'CHANGELOG'
])
end
it
'does not set follow when there are no paths'
do
expect
(
Gitlab
::
Git
::
Commit
).
to
receive
(
:where
).
with
(
a_hash_including
(
follow:
false
)).
and_call_original
repository
.
commits
(
'master'
)
end
end
describe
'#find_commits_by_message'
do
it
'returns commits with messages containing a given string'
do
commit_ids
=
repository
.
find_commits_by_message
(
'submodule'
).
map
(
&
:id
)
...
...
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