slawekjaranowski commented on PR #179: URL: https://github.com/apache/maven-scm/pull/179#issuecomment-7204404469
Thanks for reworking this, the dedicated `SUBMODULES` parameter with a `false` default looks right to me, given that `CheckoutMojo` always sets `RECURSIVE=true`. A few things before this can go in: 1. **JGit silently ignores the flag.** `JGitCheckOutCommand` only overrides the five-argument `executeCheckOutCommand`, so the new default six-argument method drops `submodules` without any warning, and `submodules=true` on `scm:jgit:` gives a checkout without submodules. JGit's `CloneCommand` has `setCloneSubmodules(true)` (and `SubmoduleUpdateCommand` for an existing working copy), so supporting it there looks cheap. If it's out of scope for this PR, I'd at least log a warning in the default implementation when `submodules` is `true` and the provider does not handle it, and open an issue for JGit. 2. **Not reachable from the plugin.** `CheckoutMojo` doesn't expose the parameter, so for now the feature is only usable through the Java API. Can we add a `submodules` parameter (default `false`) to `CheckoutMojo` here, or track it in a follow-up issue? 3. **The fixture could use a short explanation.** `repository_submodule` is a bare repository whose `sub-prj` submodule is pointed at the fixture itself via `git submodule set-url` in the test, which is why the count goes from 5 to 9 files. It isn't obvious from the code. A comment in the test, or building the two repositories in a `@TempDir` (as the test in #1407 does), would make it easier to maintain. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
