guitarrapc / git-shallow-clone-orb

circleci orb to execute git shallow clone for faster checkout.
https://circleci.com/orbs/registry/orb/guitarrapc/git-shallow-clone
MIT License
21 stars 11 forks source link

[Feature Request] Support the parameter "shallow_since" #9

Closed suzuki-shunsuke closed 4 years ago

suzuki-shunsuke commented 4 years ago

git clone supports the option --shallow-since.

--shallow-since=<date>
Create a shallow clone with a history after the specified time.

To support the option, I propose to add the optional parameter shallow_since. By default this parameter is empty and --shallow-since isn't set, so this change keeps the compatibility. If this parameter is set, the parameter --shallow-since is set and the parameter depth is ignored.

What do you think?

Thank you.

guitarrapc commented 4 years ago

seems nice, but if I add support for this particular options future will become too many arguments. Is adding support for OPTIONS would be more user-developer friendly?

  options:
    description: >
      git options you want to add. like `options: "--shallow-since \"5 days ago\""`
    type: string
    default: ""
suzuki-shunsuke commented 4 years ago

Thank you for your reply. Cool.

Then I propose that when the option clone_options is set the parameter depth is ignored because --depth argument may conflict other argument. If users want to set the depth parameter along with clone_options, they can set --depth argument in clone_options.

Thank you.

guitarrapc commented 4 years ago

released 1.2.0.

https://circleci.com/orbs/registry/orb/guitarrapc/git-shallow-clone