Skip to content

Conversation

@ofalvai
Copy link
Contributor

@ofalvai ofalvai commented Dec 29, 2022

Context

bitrise-io/bitrise#838

Changes

Add a variadic opts string... argument to the Clone() functions, matching the other git command functions. This allows passing additional flags to the git clone command, such as the --depth=1 flag that does a shallow clone.

In the case of CloneTagOrBranch(), I decided to apply the provided opts after the hardcoded --recursive and --branch flags, making it possible to override those flags from outside (although I don't think it will be a frequent usage pattern)

@ofalvai ofalvai marked this pull request as ready for review December 29, 2022 08:44
@ofalvai ofalvai requested a review from hisaac December 29, 2022 08:44
Copy link
Contributor

@hisaac hisaac left a comment

Choose a reason for hiding this comment

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

Good idea here 👍

@ofalvai ofalvai merged commit a4c1c79 into v1 Dec 29, 2022
@ofalvai ofalvai deleted the git-clone-opts branch December 29, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants