diff options
| author | Benedict Reuschling <bcr@FreeBSD.org> | 2024-05-29 15:19:28 +0000 |
|---|---|---|
| committer | Benedict Reuschling <bcr@FreeBSD.org> | 2024-05-29 15:19:28 +0000 |
| commit | cbe1572983c139a36fb0357e16df0dd01e1318ad (patch) | |
| tree | 0bb32e3da79f2ae16cf152cd76f955daa1a4b92a | |
| parent | 82d847f5374fe8fa4d6db8ab72df920268810b5c (diff) | |
| download | doc-cbe1572983c139a36fb0357e16df0dd01e1318ad.tar.gz doc-cbe1572983c139a36fb0357e16df0dd01e1318ad.zip | |
Reduce depth of git pull when checking out ports
An initial 'git clone' of the ports tree takes a long time. The checkout we
had before this change contained all the commit history, which would
normally not be necessary nor be interesting for people who simply want
to compile ports without doing any kind of development.
To reduce the clone time add the '--depth 1' parameter in this change.
Additionally, for people that do work on ports, a sentence about
removing that option was added.
| -rw-r--r-- | documentation/content/en/books/handbook/ports/_index.adoc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/documentation/content/en/books/handbook/ports/_index.adoc b/documentation/content/en/books/handbook/ports/_index.adoc index 7ef3b47c7d..a32b0608ba 100644 --- a/documentation/content/en/books/handbook/ports/_index.adoc +++ b/documentation/content/en/books/handbook/ports/_index.adoc @@ -680,6 +680,9 @@ If more control over the ports tree is needed or if local changes need to be mai Git can be used to obtain the Ports Collection. Refer to extref:{committers-guide}[the Git Primer, git-primer] for a detailed description of Git. +We add --depth 1 to the git command line to clone the tree without obtaining the commit history, which saves time and is acceptable for most users. +If you have your own changes to the ports tree, or need the history for any reason, omit the --depth 1 argument below. + . Git must be installed before it can be used to check out the ports tree. If a copy of the ports tree is already present, install Git like this: + [source,shell] @@ -699,14 +702,14 @@ If the ports tree is not available, or pkg is being used to manage packages, Git + [source,shell] .... -# git clone https://git.FreeBSD.org/ports.git /usr/ports +# git clone --depth 1 https://git.FreeBSD.org/ports.git /usr/ports .... + . Or, check out a copy of a quarterly branch: + [source,shell] .... -# git clone https://git.FreeBSD.org/ports.git -b 2023Q1 /usr/ports +# git clone --depth 1 https://git.FreeBSD.org/ports.git -b 2023Q1 /usr/ports .... + . As needed, update `/usr/ports` after the initial Git checkout: |
