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
b0b234f7
Commit
b0b234f7
authored
Nov 05, 2014
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8234 from cirosantilli/factor-0000
Factor '0' * 40 blank ref constants [failure unrelated]
parents
70122e46
c3be1517
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
git_push_service.rb
app/services/git_push_service.rb
+3
-3
event_filters.rb
features/steps/dashboard/event_filters.rb
+1
-1
project.rb
features/steps/shared/project.rb
+1
-1
event_spec.rb
spec/models/event_spec.rb
+1
-1
git_push_service_spec.rb
spec/services/git_push_service_spec.rb
+1
-1
No files found.
app/services/git_push_service.rb
View file @
b0b234f7
...
...
@@ -160,19 +160,19 @@ class GitPushService
ref_parts
=
ref
.
split
(
'/'
)
# Return if this is not a push to a branch (e.g. new commits)
ref_parts
[
1
]
=~
/heads/
&&
oldrev
!=
"0000000000000000000000000000000000000000"
ref_parts
[
1
]
=~
/heads/
&&
oldrev
!=
Gitlab
::
Git
::
BLANK_SHA
end
def
push_to_new_branch?
(
ref
,
oldrev
)
ref_parts
=
ref
.
split
(
'/'
)
ref_parts
[
1
]
=~
/heads/
&&
oldrev
==
"0000000000000000000000000000000000000000"
ref_parts
[
1
]
=~
/heads/
&&
oldrev
==
Gitlab
::
Git
::
BLANK_SHA
end
def
push_remove_branch?
(
ref
,
newrev
)
ref_parts
=
ref
.
split
(
'/'
)
ref_parts
[
1
]
=~
/heads/
&&
newrev
==
"0000000000000000000000000000000000000000"
ref_parts
[
1
]
=~
/heads/
&&
newrev
==
Gitlab
::
Git
::
BLANK_SHA
end
def
push_to_branch?
(
ref
)
...
...
features/steps/dashboard/event_filters.rb
View file @
b0b234f7
...
...
@@ -29,7 +29,7 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps
step
'this project has push event'
do
data
=
{
before:
"0000000000000000000000000000000000000000"
,
before:
Gitlab
::
Git
::
BLANK_SHA
,
after:
"0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e"
,
ref:
"refs/heads/new_design"
,
user_id:
@user
.
id
,
...
...
features/steps/shared/project.rb
View file @
b0b234f7
...
...
@@ -32,7 +32,7 @@ module SharedProject
@project
=
Project
.
find_by
(
name:
"Shop"
)
data
=
{
before:
"0000000000000000000000000000000000000000"
,
before:
Gitlab
::
Git
::
BLANK_SHA
,
after:
"6d394385cf567f80a8fd85055db1ab4c5295806f"
,
ref:
"refs/heads/fix"
,
user_id:
@user
.
id
,
...
...
spec/models/event_spec.rb
View file @
b0b234f7
...
...
@@ -36,7 +36,7 @@ describe Event do
@user
=
project
.
owner
data
=
{
before:
"0000000000000000000000000000000000000000"
,
before:
Gitlab
::
Git
::
BLANK_SHA
,
after:
"0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e"
,
ref:
"refs/heads/master"
,
user_id:
@user
.
id
,
...
...
spec/services/git_push_service_spec.rb
View file @
b0b234f7
...
...
@@ -8,7 +8,7 @@ describe GitPushService do
let
(
:service
)
{
GitPushService
.
new
}
before
do
@blankrev
=
'0000000000000000000000000000000000000000'
@blankrev
=
Gitlab
::
Git
::
BLANK_SHA
@oldrev
=
sample_commit
.
parent_id
@newrev
=
sample_commit
.
id
@ref
=
'refs/heads/master'
...
...
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