]> source.dussan.org Git - jgit.git/commit
FetchCommand: Fix detection of submodule recursion mode 70/92670/3
authorDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 9 Mar 2017 05:04:09 +0000 (14:04 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Fri, 10 Mar 2017 04:17:39 +0000 (13:17 +0900)
commit2fe1a3abbe511fad66a9a3e8e9dbbc952d258820
tree4752629e89a1e70891d4e6e09fd6868bc6cc3a46
parent3df65a387e623fcb2332f1732c53c2a466cbd2b7
FetchCommand: Fix detection of submodule recursion mode

The submodule.name.fetchRecurseSubmodules value was being read from the
configuration of the submodule, but it should be read from the config
of the parent repository.

Also, the fetch.recurseSubmodules value from the parent repository's
configuration was not being considered at all.

Fix both of these and add tests. Now the precedence of the recurse mode
is determined as follows:

 1. Value passed to the API
 2. Value configured in submodule.name.fetchRecurseSubmodules
 3. Value configured in fetch.recurseSubmodules
 4. Default to "on demand"

Change-Id: Ic23b7c40b5f39135fb3fd754c597dd4bcc94240c
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/FetchCommandRecurseSubmodulesTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java