Add shallow submodule init support.#63
Add shallow submodule init support.#63monaka wants to merge 1 commit intojenkinsci:masterfrom monami-ya:pr-shallow-update-submodule
Conversation
|
plugins » git-client-plugin #219 SUCCESS |
|
Would probably be more flexible to introduce an UpdateCommand (like Clone or Fetch one) so a shallow option can be created as a git-plugin behavior extension |
|
Probably not UpdateCommand but SubmoduleCommand.Update.shallow() or something. |
|
realistic but not flexible enough for future plugin evolution. We move shallow concept and comparable exotic uses in "advanced behavior" to avoid over-complexity on git plugin. See previous commits in history for a sample of refactoring fetch into a Command |
|
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
|
I see. I'll re-push here after I create a ticket. |
Recent versions of git supports the shallow update (--depth={n}) option.
This patch is to add this new feature by adding methods
submoduleUpdate(boolean recursive, boolean shallow, String reference).
|
plugins » git-client-plugin #220 SUCCESS |
|
I have a question. |
|
There's indeed lots of missing tests, if you can contribute some you're welcome. |
|
Oh... Basically I agree it's better way to write unit tests. |
|
sure, anyway I won't apply this pull request as-is, as commented earlier, preferred way to extend API with additional parameters it to switch to Command pattern |
|
I see. Then, I close this pull request and I use it in my house. |
|
👍 I would like to see this implemented. Maybe it's not perfectly ideal design, but it would be great to have in projects with many submodules having a large history |
As you know, recent git (since 1.8.x) supports shallow submodule cloning.
This patch is just to add API method.
I'll send pull requests to git-plugin after this patch was approved.