Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref/ci: --fetch-depth #364

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions content/docs/ref/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ formatting and HTTP remote proxies; and, optionally, unshallowing clone).

Any [generic option](/doc/ref) in addition to:

- `--unshallow`: Fetch as much as possible, converting a shallow repository to a
complete one.
- `--fetch-depth=<number>`: Commits to fetch (use `0` for all branches & tags).
- `--user-email=<address>`: Git user email for commits [default:
`[email protected]`].
- `--user-name=<...>`: Git user name for commits [default: `Olivaw[bot]`].
Expand All @@ -26,5 +25,5 @@ Instead of wrangling with
simply run:

```cli
$ cml ci
$ cml ci --fetch-depth=0
Comment on lines -29 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Product Q: Should it be the default value?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no default value for this option, Imagine that 95% of the use cases will be --fetch-depth=0 or the previous alias for this --unshallow

Copy link
Contributor Author

@casperdcl casperdcl Nov 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--fetch-depth=0 is slow & space-consuming so can't be the default. Also, we can't use --fetch-depth=1 imitating GHA because that would truncate unshallow repos.

Safest is to have undefined (unset) default, i.e. do-nothing, but document --fetch-depth=0 as the most likely use case.

```