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
c9ac38a0
Commit
c9ac38a0
authored
Dec 11, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Gitlab::Git instead of Ci::Git
parent
1c0683da
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
+4
-9
app/models/ci/commit.rb
app/models/ci/commit.rb
+1
-1
app/services/create_commit_builds_service.rb
app/services/create_commit_builds_service.rb
+3
-3
lib/ci/git.rb
lib/ci/git.rb
+0
-5
No files found.
app/models/ci/commit.rb
View file @
c9ac38a0
...
@@ -53,7 +53,7 @@ module Ci
...
@@ -53,7 +53,7 @@ module Ci
end
end
def
valid_commit_sha
def
valid_commit_sha
if
self
.
sha
==
Ci
::
Git
::
BLANK_SHA
if
self
.
sha
==
Gitlab
::
Git
::
BLANK_SHA
self
.
errors
.
add
(
:sha
,
" cant be 00000000 (branch removal)"
)
self
.
errors
.
add
(
:sha
,
" cant be 00000000 (branch removal)"
)
end
end
end
end
...
...
app/services/create_commit_builds_service.rb
View file @
c9ac38a0
...
@@ -9,14 +9,14 @@ class CreateCommitBuildsService
...
@@ -9,14 +9,14 @@ class CreateCommitBuildsService
return
false
return
false
end
end
ref
=
origin_ref
.
gsub
(
/\Arefs\/(tags|heads)\//
,
''
)
ref
=
Gitlab
::
Git
.
ref_name
(
origin_ref
)
# Skip branch removal
# Skip branch removal
if
sha
==
Ci
::
Git
::
BLANK_SHA
if
sha
==
Gitlab
::
Git
::
BLANK_SHA
return
false
return
false
end
end
tag
=
origin_ref
.
start_with?
(
'refs/tags/'
)
tag
=
Gitlab
::
Git
.
tag_ref?
(
origin_ref
)
commit
=
project
.
ensure_ci_commit
(
sha
)
commit
=
project
.
ensure_ci_commit
(
sha
)
unless
commit
.
skip_ci?
unless
commit
.
skip_ci?
commit
.
update_committed!
commit
.
update_committed!
...
...
lib/ci/git.rb
deleted
100644 → 0
View file @
1c0683da
module
Ci
module
Git
BLANK_SHA
=
'0'
*
40
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