Skip to content

Commit

Permalink
docs: add --depth=2 to reduce download size (spack#46605)
Browse files Browse the repository at this point in the history
* docs: add --depth=2 to reduce download size

* Add note to tell users about --depth=2 and manyFiles

* Fix inline code in info block
  • Loading branch information
alecbcs authored Sep 27, 2024
1 parent 9ad1d0c commit 9b5f15a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,18 @@ See the
[Feature Overview](https://spack.readthedocs.io/en/latest/features.html)
for examples and highlights.

To install spack and your first package, make sure you have Python.
To install spack and your first package, make sure you have Python & Git.
Then:

$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
$ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
$ cd spack/bin
$ ./spack install zlib

> [!TIP]
> `-c feature.manyFiles=true` improves git's performance on repositories with 1,000+ files.
>
> `--depth=2` prunes the git history to reduce the size of the Spack installation.
Documentation
----------------

Expand Down
8 changes: 6 additions & 2 deletions lib/spack/docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,15 @@ Getting Spack is easy. You can clone it from the `github repository

.. code-block:: console
$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
$ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
This will create a directory called ``spack``.

.. note::
``-c feature.manyFiles=true`` improves git's performance on repositories with 1,000+ files.

``--depth=2`` prunes the git history to reduce the size of the Spack installation.

.. _shell-support:

^^^^^^^^^^^^^
Expand Down Expand Up @@ -1576,4 +1581,3 @@ The intent is to provide a Windows installer that will automatically set up
Python, Git, and Spack, instead of requiring the user to do so manually.
Instructions for creating the installer are at
https://github.com/spack/spack/blob/develop/lib/spack/spack/cmd/installer/README.md

7 changes: 6 additions & 1 deletion lib/spack/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@ package:

.. code-block:: console
$ git clone -c feature.manyFiles=true https://github.com/spack/spack.git
$ git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
$ cd spack/bin
$ ./spack install libelf
.. note::
``-c feature.manyFiles=true`` improves git's performance on repositories with 1,000+ files.

``--depth=2`` prunes the git history to reduce the size of the Spack installation.

If you're new to spack and want to start using it, see :doc:`getting_started`,
or refer to the full manual below.

Expand Down

0 comments on commit 9b5f15a

Please sign in to comment.