Community
Participate
Working Groups
Refspecs that are set manually on a fetch are passed to the submodule fetches if recursion is enabled. This is inconsistent with command line Git and is problematic if the parent and child repositories do not have the same branch names. Instead, it should always use the default refspecs for submodules, or the API should provide a way to set the submodule refspecs manually. Code example: Git git = ... List<RefSpec> = ... FetchCommand fetch = git.fetch(); fetch.setRefSpecs(refSpecs); fetch.setRecurseSubmodules(FetchRecurseSubmodulesMode.YES); FetchResult result = fetch.call();