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
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
+4
-9
commit.rb
app/models/ci/commit.rb
+1
-1
create_commit_builds_service.rb
app/services/create_commit_builds_service.rb
+3
-3
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
end
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)"
)
end
end
...
...
app/services/create_commit_builds_service.rb
View file @
c9ac38a0
...
...
@@ -9,14 +9,14 @@ class CreateCommitBuildsService
return
false
end
ref
=
origin_ref
.
gsub
(
/\Arefs\/(tags|heads)\//
,
''
)
ref
=
Gitlab
::
Git
.
ref_name
(
origin_ref
)
# Skip branch removal
if
sha
==
Ci
::
Git
::
BLANK_SHA
if
sha
==
Gitlab
::
Git
::
BLANK_SHA
return
false
end
tag
=
origin_ref
.
start_with?
(
'refs/tags/'
)
tag
=
Gitlab
::
Git
.
tag_ref?
(
origin_ref
)
commit
=
project
.
ensure_ci_commit
(
sha
)
unless
commit
.
skip_ci?
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