]> source.dussan.org Git - jgit.git/commit
Add API to specify the submodule name 87/125987/3
authorMasaya Suzuki <masayasuzuki@google.com>
Thu, 12 Jul 2018 15:32:32 +0000 (08:32 -0700)
committerJonathan Nieder <jrn@google.com>
Thu, 12 Jul 2018 19:27:28 +0000 (12:27 -0700)
commit579bff6653991e2a2a6c98d440ed00dbd9748a17
treed87208f74b54745dccc5a553b2562d77b8d9b7f0
parent263a8c1c06f9a237520959934dc0a8b93b56a2f4
Add API to specify the submodule name

Currently SubmoduleAddCommand always uses the path as submodule name.
This patch lets the caller specify a submodule name.

SubmoduleUpdateCommand still does not make use of the submodule name
(see bug 535027) but Git does.  To avoid triggering CVE-2018-11235,
do some validation on the name to avoid '..' path components.

[jn: fleshed out commit message, mostly to work around flaky CI]

Change-Id: I6879c043c6d7973556e2080387f23c246e3d76a5
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
Signed-off-by: Jonathan Nieder <jrn@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/submodule/SubmoduleAddTest.java
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java