Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.build
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
slapos.recipe.build
Commits
4f852484
Commit
4f852484
authored
Oct 24, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitclone: new 'shared' option
parent
af657749
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
README.rst
README.rst
+12
-8
slapos/recipe/gitclone.py
slapos/recipe/gitclone.py
+5
-1
No files found.
README.rst
View file @
4f852484
...
@@ -437,14 +437,6 @@ The default git command is `git`, if for a any reason you don't
...
@@ -437,14 +437,6 @@ The default git command is `git`, if for a any reason you don't
have git in your path, you can specify git binary path with `git-command`
have git in your path, you can specify git binary path with `git-command`
option.
option.
Sparse checkout
~~~~~~~~~~~~~~~
The value of the `sparse-checkout` option is written to the
``$GITDIR/info/sparse-checkout`` file, which is used to populate the working
directory sparsely. See the `SPARSE CHECKOUT` section of ``git-read-tree``
command. This feature is disabled if the value is empty or unset.
Ignore SSL certificate
Ignore SSL certificate
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
...
@@ -461,6 +453,18 @@ boolean option::
...
@@ -461,6 +453,18 @@ boolean option::
repository = https://example.net/example.git/
repository = https://example.net/example.git/
ignore-ssl-certificate = true
ignore-ssl-certificate = true
Other options
~~~~~~~~~~~~~
shared
Clone with ``--shared`` option if true. See ``git-clone`` command.
sparse-checkout
The value of the `sparse-checkout` option is written to the
``$GITDIR/info/sparse-checkout`` file, which is used to populate the working
directory sparsely. See the `SPARSE CHECKOUT` section of ``git-read-tree``
command. This feature is disabled if the value is empty or unset.
Full example
Full example
~~~~~~~~~~~~
~~~~~~~~~~~~
...
...
slapos/recipe/gitclone.py
View file @
4f852484
...
@@ -140,8 +140,10 @@ class Recipe(object):
...
@@ -140,8 +140,10 @@ class Recipe(object):
self
.
git_command
=
'git'
self
.
git_command
=
'git'
self
.
sparse
=
options
.
get
(
'sparse-checkout'
,
''
).
strip
()
self
.
sparse
=
options
.
get
(
'sparse-checkout'
,
''
).
strip
()
# Set boolean values
# Set boolean values
for
key
in
(
'develop'
,
'use-cache'
,
'ignore-ssl-certificate'
):
for
key
in
(
'develop'
,
'
shared'
,
'
use-cache'
,
'ignore-ssl-certificate'
):
setattr
(
self
,
key
.
replace
(
'-'
,
'_'
),
options
.
get
(
key
,
''
).
lower
()
in
TRUE_VALUES
)
setattr
(
self
,
key
.
replace
(
'-'
,
'_'
),
options
.
get
(
key
,
''
).
lower
()
in
TRUE_VALUES
)
if
self
.
shared
:
self
.
use_cache
=
False
self
.
networkcache
=
buildout
.
get
(
'networkcache'
,
{})
self
.
networkcache
=
buildout
.
get
(
'networkcache'
,
{})
...
@@ -194,6 +196,8 @@ class Recipe(object):
...
@@ -194,6 +196,8 @@ class Recipe(object):
self
.
repository
,
self
.
repository
,
self
.
location
]
self
.
location
]
config
=
[]
config
=
[]
if
self
.
shared
:
git_clone_command
.
append
(
'--shared'
)
if
self
.
sparse
:
if
self
.
sparse
:
git_clone_command
.
append
(
'--no-checkout'
)
git_clone_command
.
append
(
'--no-checkout'
)
config
.
append
(
'core.sparseCheckout=true'
)
config
.
append
(
'core.sparseCheckout=true'
)
...
...
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