summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ReceivePack: Prevent pointing a branch to a non-commit objectYunjie Li2019-09-065-33/+45
| | | | | | | | | | | | | | | | | | | | | | | | Since commit c3b0dec509fe136c5417422f31898b5a4e2d5e02, Git has disallowed writing a non-commit to refs/heads/* refs. JGit still allows that, which can put users in a bad situation. For example, git push origin v1.0:master pushes the tag object v1.0 to refs/heads/master, instead of the intended commit object v1.0^{commit}. Prevent that by validating that the target of the ref points to a commit object when pushing to refs/heads/*. Git performs the same check at a lower level (in the RefDatabase). We could do the same here, but for now let's start conservatively by handling it in pushes first. [jn: fleshed out commit message] Change-Id: I8f98ae6d8acbcd5ef7553ec732bc096cb6eb7c4e Signed-off-by: Yunjie Li <yunjieli@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
* Merge branch 'stable-5.5'Matthias Sohn2019-09-0517-26/+26
|\ | | | | | | | | | | | | | | | | | | * stable-5.5: Update Orbit to R20190827152740 for 2019-09 Prepare 5.5.0-SNAPSHOT builds JGit v5.5.0.201909041048-rc1 Change-Id: I008b374824e95138c78b4cdd56d39c47800d8cec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Update Orbit to R20190827152740 for 2019-09Matthias Sohn2019-09-0517-26/+26
| | | | | | | | Change-Id: I31d0ba525990cd391b704431212d98ce8b8b3970 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.5.0-SNAPSHOT buildsMatthias Sohn2019-09-0473-104/+104
| | | | | | | | | | Change-Id: I96bbefd698c74e450d05d21572d4769c6c5aaea6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.5.0.201909041048-rc1v5.5.0.201909041048-rc1Matthias Sohn2019-09-0473-104/+104
| | | | | | | | | | Change-Id: I77a8c73cfd0a27b1242eddf32da513ce0148260e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-5.5'Matthias Sohn2019-09-0427-483/+1064
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Prepare 5.4.4-SNAPSHOT builds JGit v5.4.3.201909031940-r Prepare 5.3.6-SNAPSHOT builds JGit v5.3.5.201909031855-r Prepare 5.1.12-SNAPSHOT builds JGit v5.1.11.201909031202-r Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings sshd: fix proxy connections with the DefaultProxyDataFactory sshd: support the HashKnownHosts configuration sshd: configurable server key verification sshd: allow setting a null ssh config sshd: simplify OpenSshServerKeyVerifier sshd: simplify ServerKeyLookup interface Use https in update site URLs Change-Id: Icd21a8fcccffd56bfedbd037e48028308db6d13b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2019-09-043-61/+88
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Prepare 5.4.4-SNAPSHOT builds JGit v5.4.3.201909031940-r Prepare 5.3.6-SNAPSHOT builds JGit v5.3.5.201909031855-r Prepare 5.1.12-SNAPSHOT builds JGit v5.1.11.201909031202-r Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: Icd6630db6458971f840c3ab4553e00f6c775ede0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Prepare 5.4.4-SNAPSHOT buildsMatthias Sohn2019-09-0473-451/+451
| | | | | | | | | | | | | | | Change-Id: I64c03436c285bd8eb5e87abe560417402b60e695 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * JGit v5.4.3.201909031940-rv5.4.3.201909031940-rMatthias Sohn2019-09-0473-104/+104
| | | | | | | | | | | | | | | Change-Id: I48ff1d51122ff73e0561f1fcf52a532221810e5d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2019-09-046-86/+279
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Prepare 5.3.6-SNAPSHOT builds JGit v5.3.5.201909031855-r Prepare 5.1.12-SNAPSHOT builds JGit v5.1.11.201909031202-r Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: Icfd5a612055feeff04733c0d2c44837ab554a2c4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Prepare 5.3.6-SNAPSHOT buildsMatthias Sohn2019-09-0468-427/+427
| | | | | | | | | | | | | | | | | | | | Change-Id: I4d57f8ea0ab1f8fbd73fd75861f2f751c4aba0a6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * JGit v5.3.5.201909031855-rv5.3.5.201909031855-rMatthias Sohn2019-09-0468-89/+89
| | | | | | | | | | | | | | | | | | | | Change-Id: I7f5dcebc2e5816c845fa63046c67bc2301926e2a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2019-09-046-106/+176
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Prepare 5.1.12-SNAPSHOT builds JGit v5.1.11.201909031202-r Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: I7e88c7c7d202f1e3fb8e143277650aa5fefff439 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2019-09-046-88/+162
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.12-SNAPSHOT builds JGit v5.1.11.201909031202-r Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: Iac5dc9683cea97db04d20f27c10f2e103d3ae7b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Prepare 5.1.12-SNAPSHOT buildsMatthias Sohn2019-09-0356-359/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I353ac3f23024063722abc7340bc9a6df3c615741 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * JGit v5.1.11.201909031202-rv5.1.11.201909031202-rMatthias Sohn2019-09-0356-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I288acf670160b9bcd2d04f572a902b5838b4d4f8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Merge branch 'stable-5.0' into stable-5.1Matthias Sohn2019-09-036-88/+116
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: I172136a031ff0730e575327cafb3527c9650a71d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | * Merge branch 'stable-4.11' into stable-5.0stable-5.0Matthias Sohn2019-09-0310-273/+186
| | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: Prepare 4.11.10-SNAPSHOT builds JGit v4.11.9.201909030838-r Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: Ifb6a4dbea2f48fd2ffa66eb737d61920aefedfbd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Prepare 4.11.10-SNAPSHOT buildsstable-4.11Matthias Sohn2019-09-0356-356/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic98bd87d96ce627d38e1ecc2c3cb28b517ab489e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * JGit v4.11.9.201909030838-rv4.11.9.201909030838-rMatthias Sohn2019-09-0356-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie60468569074197d49e19cbd0ffaedfe88f3d74e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | * Merge branch 'stable-4.10' into stable-4.11Matthias Sohn2019-09-038-269/+215
| | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.10: Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: If672b4f0c350f4e8ff7e1e706485cffd8137236d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | * Merge branch 'stable-4.9' into stable-4.10stable-4.10Matthias Sohn2019-09-032-2/+1
| | | | | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Bazel: Update bazlets to the latest master revision Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file Change-Id: I8bb74aacc1c010cfed9a0c8acffb520724f0e395 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * Bazel: Update bazlets to the latest master revisionstable-4.9David Pursehouse2019-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest revision includes various fixes to allow the build to work with recent versions of Bazel. Change-Id: I72c100b99762010946d9b2784286af560bbdf185 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | | | | | * Bazel: Remove FileTreeIteratorWithTimeControl from BUILD fileDavid Pursehouse2019-09-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FileTreeIteratorWithTimeControl was deleted in a024759, but was not removed from the BUILD file, thus causing the bazel build to fail. Change-Id: I892c0ffcac947298d0d6009374ee2c5d9afefb66 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> (cherry picked from commit e54fde8616f53a6fab5201db4a0c7e67dd0145c5)
| | | | | | | | * | Merge branch 'stable-4.9' into stable-4.10Matthias Sohn2019-09-035-271/+165
| | | | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: BatchRefUpdate: repro racy atomic update, and fix it Delete unused FileTreeIteratorWithTimeControl Fix RacyGitTests#testRacyGitDetection Change RacyGitTests to create a racy git situation in a stable way Silence API warnings Change-Id: Id5bf44645655fca40ad22bb1f1ad20a7c2e8f6db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * BatchRefUpdate: repro racy atomic update, and fix itHan-Wen Nienhuys2019-09-032-60/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PackedBatchRefUpdate was creating a new packed-refs list that was potentially unsorted. This would be papered over when the list was read back from disk in parsePackedRef, which detects unsorted ref lists on reading, and sorts them. However, the BatchRefUpdate also installed the new (unsorted) list in-memory in RefDirectory#packedRefs. With the timestamp granularity code committed to stable-5.1, we can more often accurately decide that the packed-refs file is clean, and will return the erroneous unsorted data more often. Unluckily timed delays also cause the file to be clean, hence this problem was exacerbated under load. The symptom is that refs added by a BatchRefUpdate would stop being visible directly after they were added. In particular, the Gerrit integration tests uses BatchRefUpdate in its setup for creating the Admin group, and then tries to read it out directly afterward. The tests recreates one failure case. A better approach would be to revise RefList.Builder, so it detects out-of-order lists and automatically sorts them. Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=548716 and https://bugs.chromium.org/p/gerrit/issues/detail?id=11373. Bug: 548716 Change-Id: I613c8059964513ce2370543620725b540b3cb6d1 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | | | | | * Delete unused FileTreeIteratorWithTimeControlMatthias Sohn2019-09-032-177/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only usage of this test iterator was removed in df637928d. Hence delete this iterator and associated test. Change-Id: I47710133ec3edc675c21db210960c024982668c6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> (cherry picked from commit a024759cf5bf1cd6b9beb4f790d484943761a7e1)
| | | | | | | | | * Fix RacyGitTests#testRacyGitDetectionMatthias Sohn2019-09-031-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test case assumed file system timestamp resolution of 1 second. On filesystems with a finer resolution this test fails since the index entry is only smudged if the file index entry's lastModified and the lastModified of the git index itself are within the same filesystem timer tick. Fix this by ensuring that these timestamps are identical which should work for any filesystem timer resolution. Bug: 548188 Change-Id: Id84d59e1cfeb48fa008f8f27f2f892c4f73985de Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> (cherry picked from commit 1159f9dd7c80a53c2509cd75d997a6afed37f9a6)
| | | | | | | | | * Change RacyGitTests to create a racy git situation in a stable wayMasaya Suzuki2019-09-031-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using File#setLastModified, we can create a racy git situation stably. Tested with --runs_per_test=100 Bug: 526111 Change-Id: I60b3632d353e19f335668325aa603640be423f58 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com> (cherry picked from commit df637928d2ef4b9ee06af7e37344c7848f870ce4)
| | | | | | | | | * Silence API warningsMatthias Sohn2019-09-031-8/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I27fd62de51ca0eedcc7e2e256487bda1e18bce8a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | | | sshd: fix proxy connections with the DefaultProxyDataFactoryThomas Wolf2019-09-022-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The java.net.ProxySelector is quite a bit different from the one in Eclipse. Eclipse (and the OS) uses "socks" as URI scheme to look up a SOCKS proxy. java.net.ProxySelector needs "socket" as scheme (and internally maps that to "socks" if and when it asks the OS about the proxies). Moreover, java.net.ProxySelector may return unresolved addresses, whereas the Eclipse proxy selector always returns resolved addresses. Fix both by explicitly resolving unresolved proxy addresses and using scheme "socket" in the DefaultProxyDataFactory. Tested manually with the jgit command-line tool using ssh -vvv -D7020 localhost and 3proxy as SOCKS5 proxies on localhost (3proxy with user/password authentication). Start jgit with _JAVA_OPTIONS set to "-DsocksProxyHost=<host> -DsocksProxyPort=<port> -Djava.net.useSystemProxies=false" to test manually. Bug: 548965 Change-Id: Ib81ae8255ac2f9c48268f172e7d8ebb4a792b66d Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | | | | sshd: support the HashKnownHosts configurationThomas Wolf2019-09-027-15/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the constant, and implement hashing of known host names in OpenSshServerKeyDatabase. Add a test verifying that the hashing works. Bug: 548492 Change-Id: Iabe82b666da627bd7f4d82519a366d166aa9ddd4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | | | | sshd: configurable server key verificationThomas Wolf2019-09-026-89/+688
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a wrapper interface and change the implementation such that a client can substitute its own database of known hosts keys instead of the default file-based mechanism. Bug: 547619 Change-Id: Ifc25a4519fa5bcf7bb8541b9f3e2de15215e3d66 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | | | | sshd: allow setting a null ssh configThomas Wolf2019-08-302-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same effect could already be obtained if the ~/.ssh/config file did not exist. But that is more difficult to control by clients, since JGit would pick up the config if it was then created. Therefore allow specifying a null config explicitly to permanently switch off config file handling. Change-Id: Iedf8a7f4d5c1ca08e0a513ed28301d8e5261b22a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | | | | sshd: simplify OpenSshServerKeyVerifierThomas Wolf2019-08-301-160/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the dependency on the ClientSession in preparation to remove it altogether. Remove the internal helper, re-implement the needed bits. We have not implemented any configuration possibility in JGit for creating hashed host names in known hosts files, so we don't need the sshd code that theoretically would enable this. Change-Id: I295f5106b60e1cc3a9d085b0cb7ff747daae88be Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | | | | sshd: simplify ServerKeyLookup interfaceThomas Wolf2019-08-303-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're actually interested only in the known public keys, we don't need the corresponding host entry from the config. Change-Id: Ibde6dffe9e3f87bfbb7c70d1f733b2b0e28cad71 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | | | | | | | | Use https in update site URLsMatthias Sohn2019-08-307-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 450485 Change-Id: I4fc288fbea2e8186d20295e9fadec721641e779b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | Merge changes I1217f5f2,Iba037e0e,I61e6c93c,I6304d1cbDavid Pursehouse2019-08-302-98/+115
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: dfs: Take size as long instead of int dfs: Read at the aligned position dfs: Add a position argument dfs: Move the deeply nested code to its own method
| * | | | | | | | | | dfs: Take size as long instead of intMasaya Suzuki2019-08-122-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Practically we wouldn't have 2GB+ objects in the DfsBlockCache, but by making it long, we can clean up some long-to-integer conversions. Change-Id: I1217f5f273a1420d80e2307ac9ff4a52460237a2 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
| * | | | | | | | | | dfs: Read at the aligned positionMasaya Suzuki2019-08-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The position is anyway aligned in BlockBasedFile, so this is no-op. Change-Id: Iba037e0ecff339393dd2c03fc5ae4fe858031e4f Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
| * | | | | | | | | | dfs: Add a position argumentMasaya Suzuki2019-08-122-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes DfsBlockCache methods more unified. Also this reduces a magic number embedded in DfsBlockCache. Change-Id: I61e6c93ca283c0395738103bd2d94091edbccd4e Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
| * | | | | | | | | | dfs: Move the deeply nested code to its own methodMasaya Suzuki2019-08-121-84/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a pure code move. Change-Id: I6304d1cb2b22cfce969b7b5eaaec911ea28579c0 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
* | | | | | | | | | | Merge branch 'stable-5.5'Jonathan Nieder2019-08-293-60/+166
|\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Return a new instance from openSystemConfig and openUserConfig Change-Id: I3ba9fa8ceced6e9f883fc23afb0e2c812391beac Signed-off-by: Jonathan Nieder <jrn@google.com>
| * | | | | | | | | | Merge branch 'stable-5.4' into stable-5.5Jonathan Nieder2019-08-293-60/+166
| |\ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Return a new instance from openSystemConfig and openUserConfig Change-Id: If576513ebbd80c7f01b83be5ab2edd436f5739e3 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | * | | | | | | | | Merge branch 'stable-5.3' into stable-5.4Jonathan Nieder2019-08-293-60/+166
| | |\ \ \ \ \ \ \ \ \ | | | | |/ / / / / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Return a new instance from openSystemConfig and openUserConfig Change-Id: I5f2f957ff27b7941ab29b2dc1c885fbf0093705a Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | * | | | | | | | Merge branch 'stable-5.2' into stable-5.3Jonathan Nieder2019-08-293-60/+166
| | | |\ \ \ \ \ \ \ \ | | | | | |/ / / / / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Return a new instance from openSystemConfig and openUserConfig Change-Id: I6491549ab13aad2a4c3f8444a090a94a378eccdb Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | * | | | | | | Merge branch 'stable-5.1' into stable-5.2Jonathan Nieder2019-08-293-61/+167
| | | | |\ \ \ \ \ \ \ | | | | | | |/ / / / / | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Return a new instance from openSystemConfig and openUserConfig Change-Id: I93afa16b14e3e2d127705e3378fb703d6c329694 Signed-off-by: Jonathan Nieder <jrn@google.com>
| | | | | * | | | | | Return a new instance from openSystemConfig and openUserConfigMatthias Sohn2019-08-304-61/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the handling of cached user and system config to getSystemConfig and getUserConfig methods and revert the implementation of openSystemConfig and openUserConfig to the old stateless implementation. This ensures the open methods respect the passed-in parent config, which may be different on each invocation. Additionally, returning a new instance matches the behavior of the previous implementation of the default system reader, which downstream callers may be depending on. Move the implementation of the new caching methods getSystemConfig and getUserConfig up to SystemReader. This avoids that we break the ABI for subclasses of SystemReader. Also see [1] which fixed a similar problem with Gerrit's custom SystemReader. [1] https://gerrit-review.googlesource.com/c/gerrit/+/225458 Change-Id: If54a2491932d8fc914d4649cb73c9e837c5b8ad0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | | Prepare 5.6.0-SNAPSHOT buildsMatthias Sohn2019-08-2973-452/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9eceb7b1272b27b979144041c75eb09ab4eeca6b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | | | Merge branch 'stable-5.5'Matthias Sohn2019-08-2919-40/+42
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Update Orbit to S20190827152740 for 2019-09 RC1 Silence warnings for non-externalized strings Prepare 5.5.0-SNAPSHOT builds JGit v5.5.0.201908280940-m3 Change-Id: I8298387fac1899df3f2fdc808cef33a9a7c7b2ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>