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
Boxiang Sun
slapos.recipe.build
Commits
4f852484
Commit
4f852484
authored
8 years ago
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitclone: new 'shared' option
parent
af657749
Changes
2
Hide 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
have git in your path, you can specify git binary path with `git-command`
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
~~~~~~~~~~~~~~~~~~~~~~
...
...
@@ -461,6 +453,18 @@ boolean option::
repository = https://example.net/example.git/
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
~~~~~~~~~~~~
...
...
This diff is collapsed.
Click to expand it.
slapos/recipe/gitclone.py
View file @
4f852484
...
...
@@ -140,8 +140,10 @@ class Recipe(object):
self
.
git_command
=
'git'
self
.
sparse
=
options
.
get
(
'sparse-checkout'
,
''
).
strip
()
# 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
)
if
self
.
shared
:
self
.
use_cache
=
False
self
.
networkcache
=
buildout
.
get
(
'networkcache'
,
{})
...
...
@@ -194,6 +196,8 @@ class Recipe(object):
self
.
repository
,
self
.
location
]
config
=
[]
if
self
.
shared
:
git_clone_command
.
append
(
'--shared'
)
if
self
.
sparse
:
git_clone_command
.
append
(
'--no-checkout'
)
config
.
append
(
'core.sparseCheckout=true'
)
...
...
This diff is collapsed.
Click to expand it.
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