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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
be644ace
Commit
be644ace
authored
Sep 15, 2021
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes unused method from spec bare_repo_operations.rb
parent
41e7f385
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
spec/support/helpers/bare_repo_operations.rb
spec/support/helpers/bare_repo_operations.rb
+0
-19
No files found.
spec/support/helpers/bare_repo_operations.rb
View file @
be644ace
...
...
@@ -17,25 +17,6 @@ class BareRepoOperations
commit_id
[
0
]
end
def
commit_file
(
file
,
dst_path
,
branch
=
'master'
)
head_id
=
execute
([
'show'
,
'--format=format:%H'
,
'--no-patch'
,
branch
],
allow_failure:
true
)[
0
]
||
Gitlab
::
Git
::
EMPTY_TREE_ID
execute
([
'read-tree'
,
'--empty'
])
execute
([
'read-tree'
,
head_id
])
blob_id
=
execute
([
'hash-object'
,
'--stdin'
,
'-w'
])
do
|
stdin
|
stdin
.
write
(
file
.
read
)
end
execute
([
'update-index'
,
'--add'
,
'--cacheinfo'
,
'100644'
,
blob_id
[
0
],
dst_path
])
tree_id
=
execute
([
'write-tree'
])
commit_id
=
commit_tree
(
tree_id
[
0
],
"Add
#{
dst_path
}
"
,
parent:
head_id
)
execute
([
'update-ref'
,
"refs/heads/
#{
branch
}
"
,
commit_id
])
end
private
def
execute
(
args
,
allow_failure:
false
)
...
...
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