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
Boxiang Sun
gitlab-ce
Commits
489d8e11
Commit
489d8e11
authored
Jun 28, 2017
by
Jacob Vosmaer (GitLab)
Committed by
Rémy Coutable
Jun 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vendor the gitlab-git-test repo
parent
5dd6d9a9
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
105 additions
and
2 deletions
+105
-2
.gitlab-ci.yml
.gitlab-ci.yml
+6
-0
spec/support/generate-seed-repo-rb
spec/support/generate-seed-repo-rb
+1
-1
spec/support/gitlab-git-test.git/HEAD
spec/support/gitlab-git-test.git/HEAD
+1
-0
spec/support/gitlab-git-test.git/README.md
spec/support/gitlab-git-test.git/README.md
+16
-0
spec/support/gitlab-git-test.git/config
spec/support/gitlab-git-test.git/config
+7
-0
spec/support/gitlab-git-test.git/objects/pack/pack-691247af2a6acb0b63b73ac0cb90540e93614043.idx
...ts/pack/pack-691247af2a6acb0b63b73ac0cb90540e93614043.idx
+0
-0
spec/support/gitlab-git-test.git/objects/pack/pack-691247af2a6acb0b63b73ac0cb90540e93614043.pack
...s/pack/pack-691247af2a6acb0b63b73ac0cb90540e93614043.pack
+0
-0
spec/support/gitlab-git-test.git/packed-refs
spec/support/gitlab-git-test.git/packed-refs
+18
-0
spec/support/gitlab-git-test.git/refs/heads/.gitkeep
spec/support/gitlab-git-test.git/refs/heads/.gitkeep
+0
-0
spec/support/gitlab-git-test.git/refs/tags/.gitkeep
spec/support/gitlab-git-test.git/refs/tags/.gitkeep
+0
-0
spec/support/prepare-gitlab-git-test-for-commit
spec/support/prepare-gitlab-git-test-for-commit
+17
-0
spec/support/seed_helper.rb
spec/support/seed_helper.rb
+1
-1
spec/support/unpack-gitlab-git-test
spec/support/unpack-gitlab-git-test
+38
-0
No files found.
.gitlab-ci.yml
View file @
489d8e11
...
@@ -550,3 +550,9 @@ cache gems:
...
@@ -550,3 +550,9 @@ cache gems:
only
:
only
:
-
master@gitlab-org/gitlab-ce
-
master@gitlab-org/gitlab-ce
-
master@gitlab-org/gitlab-ee
-
master@gitlab-org/gitlab-ee
gitlab_git_test
:
variables
:
SETUP_DB
:
"
false"
script
:
-
spec/support/prepare-gitlab-git-test-for-commit --check-for-changes
spec/support/generate-seed-repo-rb
View file @
489d8e11
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
require
'erb'
require
'erb'
require
'tempfile'
require
'tempfile'
SOURCE
=
'https://gitlab.com/gitlab-org/gitlab-git-test.git'
.
freeze
SOURCE
=
File
.
expand_path
(
'../gitlab-git-test.git'
,
__FILE__
)
.
freeze
SCRIPT_NAME
=
'generate-seed-repo-rb'
.
freeze
SCRIPT_NAME
=
'generate-seed-repo-rb'
.
freeze
REPO_NAME
=
'gitlab-git-test.git'
.
freeze
REPO_NAME
=
'gitlab-git-test.git'
.
freeze
...
...
spec/support/gitlab-git-test.git/HEAD
0 → 100644
View file @
489d8e11
ref: refs/heads/master
spec/support/gitlab-git-test.git/README.md
0 → 100644
View file @
489d8e11
# Gitlab::Git test repository
This repository is used by (some of) the tests in spec/lib/gitlab/git.
Do not add new large files to this repository. Otherwise we needlessly
inflate the size of the gitlab-ce repository.
## How to make changes to this repository
-
(if needed) clone
`https://gitlab.com/gitlab-org/gitlab-ce.git`
to your local machine
-
clone
`gitlab-ce/spec/support/gitlab-git-test.git`
locally (i.e. clone from your hard drive, not from the internet)
-
make changes in your local clone of gitlab-git-test
-
run
`git push`
which will push to your local source
`gitlab-ce/spec/support/gitlab-git-test.git`
-
in gitlab-ce: run
`spec/support/prepare-gitlab-git-test-for-commit`
-
in gitlab-ce:
`git add spec/support/seed_repo.rb spec/support/gitlab-git-test.git`
-
commit your changes in gitlab-ce
spec/support/gitlab-git-test.git/config
0 → 100644
View file @
489d8e11
[core]
repositoryformatversion = 0
filemode = true
bare = true
precomposeunicode = true
[remote "origin"]
url = https://gitlab.com/gitlab-org/gitlab-git-test.git
spec/support/gitlab-git-test.git/objects/pack/pack-691247af2a6acb0b63b73ac0cb90540e93614043.idx
0 → 100644
View file @
489d8e11
File added
spec/support/gitlab-git-test.git/objects/pack/pack-691247af2a6acb0b63b73ac0cb90540e93614043.pack
0 → 100644
View file @
489d8e11
File added
spec/support/gitlab-git-test.git/packed-refs
0 → 100644
View file @
489d8e11
# pack-refs with: peeled fully-peeled
0b4bc9a49b562e85de7cc9e834518ea6828729b9 refs/heads/feature
12d65c8dd2b2676fa3ac47d955accc085a37a9c1 refs/heads/fix
6473c90867124755509e100d0d35ebdc85a0b6ae refs/heads/fix-blob-path
58fa1a3af4de73ea83fe25a1ef1db8e0c56f67e5 refs/heads/fix-existing-submodule-dir
40f4a7a617393735a95a0bb67b08385bc1e7c66d refs/heads/fix-mode
9abd6a8c113a2dd76df3fdb3d58a8cec6db75f8d refs/heads/gitattributes
46e1395e609395de004cacd4b142865ab0e52a29 refs/heads/gitattributes-updated
4b4918a572fa86f9771e5ba40fbd48e1eb03e2c6 refs/heads/master
5937ac0a7beb003549fc5fd26fc247adbce4a52e refs/heads/merge-test
f4e6814c3e4e7a0de82a9e7cd20c626cc963a2f8 refs/tags/v1.0.0
^6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9
8a2a6eb295bb170b34c24c76c49ed0e9b2eaf34b refs/tags/v1.1.0
^5937ac0a7beb003549fc5fd26fc247adbce4a52e
10d64eed7760f2811ee2d64b44f1f7d3b364f17b refs/tags/v1.2.0
^eb49186cfa5c4338011f5f590fac11bd66c5c631
2ac1f24e253e08135507d0830508febaaccf02ee refs/tags/v1.2.1
^fa1b1e6c004a68b7d8763b86455da9e6b23e36d6
spec/support/gitlab-git-test.git/refs/heads/.gitkeep
0 → 100644
View file @
489d8e11
spec/support/gitlab-git-test.git/refs/tags/.gitkeep
0 → 100644
View file @
489d8e11
spec/support/prepare-gitlab-git-test-for-commit
0 → 100755
View file @
489d8e11
#!/usr/bin/env ruby
abort
unless
[
system
(
'spec/support/generate-seed-repo-rb'
,
out:
'spec/support/seed_repo.rb'
),
system
(
'spec/support/unpack-gitlab-git-test'
)
].
all?
exit
if
ARGV
.
first
!=
'--check-for-changes'
git_status
=
IO
.
popen
(
%w[git status --porcelain]
,
&
:read
)
abort
unless
$?
.
success?
puts
git_status
if
git_status
.
lines
.
grep
(
%r{^.. spec/support/gitlab-git-test.git}
).
any?
abort
"error: detected changes in gitlab-git-test.git"
end
spec/support/seed_helper.rb
View file @
489d8e11
...
@@ -9,7 +9,7 @@ TEST_MUTABLE_REPO_PATH = 'mutable-repo.git'.freeze
...
@@ -9,7 +9,7 @@ TEST_MUTABLE_REPO_PATH = 'mutable-repo.git'.freeze
TEST_BROKEN_REPO_PATH
=
'broken-repo.git'
.
freeze
TEST_BROKEN_REPO_PATH
=
'broken-repo.git'
.
freeze
module
SeedHelper
module
SeedHelper
GITLAB_GIT_TEST_REPO_URL
=
ENV
.
fetch
(
'GITLAB_GIT_TEST_REPO_URL'
,
'https://gitlab.com/gitlab-org/gitlab-git-test.git'
).
freeze
GITLAB_GIT_TEST_REPO_URL
=
File
.
expand_path
(
'../gitlab-git-test.git'
,
__FILE__
).
freeze
def
ensure_seeds
def
ensure_seeds
if
File
.
exist?
(
SEED_STORAGE_PATH
)
if
File
.
exist?
(
SEED_STORAGE_PATH
)
...
...
spec/support/unpack-gitlab-git-test
0 → 100755
View file @
489d8e11
#!/usr/bin/env ruby
require
'fileutils'
REPO
=
'spec/support/gitlab-git-test.git'
.
freeze
PACK_DIR
=
REPO
+
'/objects/pack'
GIT
=
%W[git --git-dir=
#{
REPO
}
]
.
freeze
BASE_PACK
=
'pack-691247af2a6acb0b63b73ac0cb90540e93614043'
.
freeze
def
main
unpack
# We want to store the refs in a packed-refs file because if we don't
# they can get mangled by filesystems.
abort
unless
system
(
*
GIT
,
*
%w[pack-refs --all]
)
abort
unless
system
(
*
GIT
,
'fsck'
)
end
# We don't want contributors to commit new pack files because those
# create unnecessary churn.
def
unpack
pack_files
=
Dir
[
File
.
join
(
PACK_DIR
,
'*'
)].
reject
do
|
pack
|
pack
.
start_with?
(
File
.
join
(
PACK_DIR
,
BASE_PACK
))
end
return
if
pack_files
.
empty?
pack_files
.
each
do
|
pack
|
unless
pack
.
end_with?
(
'.pack'
)
FileUtils
.
rm
(
pack
)
next
end
File
.
open
(
pack
,
'rb'
)
do
|
open_pack
|
File
.
unlink
(
pack
)
abort
unless
system
(
*
GIT
,
'unpack-objects'
,
in:
open_pack
)
end
end
end
main
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