aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/.settings
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-10-131-0/+44
|\ | | | | | | | | | | | | | | | | | | * stable-6.1: PackConfig: fix @since tags Remove unused API problem filters Add support for git config repack.packKeptObjects Do not exclude objects in locked packs from bitmap processing Change-Id: Ib4e4fe407dce334c7537bf278baa39db93aa2f09
| * Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-10-131-0/+44
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: PackConfig: fix @since tags Remove unused API problem filters Add support for git config repack.packKeptObjects Do not exclude objects in locked packs from bitmap processing Change-Id: I0c9c0b3c206cac03a93b30eda348177a4de35c36
| | * Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-10-131-109/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: PackConfig: fix @since tags Remove unused API problem filters Add support for git config repack.packKeptObjects Do not exclude objects in locked packs from bitmap processing Change-Id: Ifeaa4b4f0c5944d4ecd3042be429833ff72b43ed
| | | * Remove unused API problem filtersMatthias Sohn2023-10-131-206/+0
| | | | | | | | | | | | | | | | Change-Id: I9d5b96cf841478af8613667ef8574423630f8028
| | | * Add support for git config repack.packKeptObjectsAntonio Barone2023-10-121-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Ide3445e652 introduced the `--pack-kept-objects` option to GC for including the objects contained in the locked packfiles during the repack phase. Whilst this allowed to explicitly pass a command line argument to the jgit gc program, it did not allow the option to be read from configuration. Allow the pack kept objects option to be configured exactly as C-Git documents [1], by introducing a new `repack.packKeptObjects` configuration. `repack.packKeptObjects` defaults to `true`, when the `pack.buildBitmaps` is `true` (which is the default case), `false` otherwise. [1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-repackpackKeptObjects Bug: 582292 Change-Id: Ia931667277410d71bc079d27c097a57094299840
| | | * Do not exclude objects in locked packs from bitmap processingLuca Milanesio2023-10-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Packfiles having an equivalent .keep file are associated with in-flight pushes that haven't been completed, with potentially a set of git objects not yet referenced by a ref. If the Git client is not up-to-date, it may result in pushing a packfile, generating a <packfile>.keep on the server, which may also contain existing commits due to the lack of Git protocol negotiation in the git-receive-pack. The Git protocol negotiation is the phase where the client and the server exchange the list of refs they have for trying to find a common base and minimise the amount of objects to be transferred. The repack phase in GC was previously skipping all objects that were contained in all packfiles having a <packfile>.keep file associated (aka "locked packfiles"), which did not take into consideration the fact that excluding the existing commits would have resulted in the generation of an invalid bitmap file. The code for excluding the objects in the locked packfiles was written well before the bitmap was introduced, hence could not consider a use case that did not exist at that time. However, when the bitmap was introduced, the exclusion of locked packfiles was not changed, hence creating a potential problem. The issue went unnoticed for many years because the bitmap generation was disabled when JGit noticed any locked packfiles; however, the bitmaps are enabled again since Id722e68d9f , and the the issue is now visible and is impacting the GC repack phase. Introduce the '--pack-kept-objects' option in GC for including the objects contained in the locked packfiles during the repack phase, which is not an issue because of the following: - If there are any existing commits duplicated in the packfiles they will be just considered once anyway because the repack doesn't generate duplicates in the output packfile. - If there are any new commits that do not have any ref pointing to them, they will be automatically excluded from the output repacked packfile. The same identical solution is adopted in the C implementation of git in repack.c. Because the locked packfile is not pruned, any new commits not pointed by any refs will remain in the repository and there will not be any accidental pruning or object loss as it is today before this change. As a side-effect of this change, it is now potentially possible to still have duplicate BLOBs after GC when the keep packfile contained existing objects. However, it is way better to keep the duplication until the next GC phase rather than omitting existing objects from repacking and, therefore generating an invalid bitmap and incorrect packfile. Bug: 582292 Bug: 582455 Change-Id: Ide3445e652fcf256a7912f881cb898897c99b8f8
* | | | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-04-211-0/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Add missing since tag for SshBasicTestBase Add missing since tag for SshTestHarness#publicKey2 Silence API errors Prevent infinite loop rescanning the pack list on PackMismatchException Remove blank in maven.config Change-Id: I4c5b000b09287cc32f0e4d6a24a766ef4e17ddbe
| * | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-04-211-0/+14
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Add missing since tag for SshBasicTestBase Add missing since tag for SshTestHarness#publicKey2 Silence API errors Prevent infinite loop rescanning the pack list on PackMismatchException Remove blank in maven.config Change-Id: Ia01c5ac5259b8820afb823d97bee247b5a5fb14a
| | * | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-04-211-0/+14
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Add missing since tag for SshBasicTestBase Add missing since tag for SshTestHarness#publicKey2 Silence API errors Prevent infinite loop rescanning the pack list on PackMismatchException Remove blank in maven.config Change-Id: Id37bee59ca3c7947604c54b6d4e7c02628a657fe
| | | * Merge branch 'stable-5.12' into stable-5.13Matthias Sohn2023-04-201-0/+14
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.12: Add missing since tag for SshBasicTestBase Add missing since tag for SshTestHarness#publicKey2 Silence API errors Prevent infinite loop rescanning the pack list on PackMismatchException Remove blank in maven.config Change-Id: Ibe6652374ab5971105e62b05279f218c8c130fee
* | | | | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-04-151-0/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Remove blank in maven.config DirCache: support option index.skipHash Change-Id: Ief50a2ca8e5a8630627506f4d2142d62c0554615
| * | | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-04-151-0/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Remove blank in maven.config DirCache: support option index.skipHash Change-Id: Idf757bcab0d7a65ea63504674a681170c6db2f94
| | * | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-04-151-0/+6
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Remove blank in maven.config DirCache: support option index.skipHash Change-Id: I0cc3033b1876c8c691c2a6876206cd71fa07d2e0
| | | * | DirCache: support option index.skipHashMatthias Sohn2023-03-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support the new option index.skipHash which was introduced in git 2.40 [1]. If it is set to true skip computing the git index checksum. This accelerates Git commands that manipulate the index, such as git add, git commit, or git status. Instead of storing the checksum, write a trailing set of bytes with value zero, indicating that the computation was skipped. Accept a skipped checksum consisting of 20 null bytes when reading the index since the option could have been set to true at the time when the index was written. [1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-indexskipHash Bug: 581723 Change-Id: I28ebe44c5ca1cbcb882438665d686452a0c111b2
| | | * | Silence API errors introduced by 9424052fMatthias Sohn2023-02-211-0/+12
| | | | | | | | | | | | | | | | | | | | Change-Id: Ia9e619a8fa06648086b583c994e4b107ae06c44d
* | | | | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-02-161-0/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Fix getPackedRefs to not throw NoSuchFileException Add pack options to preserve and prune old pack files Allow to perform PackedBatchRefUpdate without locking loose refs Document option "core.sha1Implementation" introduced in 59029aec Change-Id: Id32683d5f506e082d39af269803bccee0280cc27
| * | | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-02-161-0/+12
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Add pack options to preserve and prune old pack files Allow to perform PackedBatchRefUpdate without locking loose refs Document option "core.sha1Implementation" introduced in 59029aec Change-Id: I876a38c2de8b7d5eaacd00e36b85599f88173221
| | * | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-02-161-0/+89
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Add pack options to preserve and prune old pack files Allow to perform PackedBatchRefUpdate without locking loose refs Document option "core.sha1Implementation" introduced in 59029aec Change-Id: I423f410578f5bbe178832b80fef8998a5372182c
* | | | | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-02-011-0/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Shortcut during git fetch for avoiding looping through all local refs FetchCommand: fix fetchSubmodules to work on a Ref to a blob Silence API warnings introduced by I466dcde6 Allow the exclusions of refs prefixes from bitmap PackWriterBitmapPreparer: do not include annotated tags in bitmap BatchingProgressMonitor: avoid int overflow when computing percentage Speedup GC listing objects referenced from reflogs FileSnapshotTest: Add more MISSING_FILE coverage Change-Id: Iff2fba026b49463016015b2fae1a42cf76ee2dbb
| * | | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-02-011-0/+40
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Shortcut during git fetch for avoiding looping through all local refs FetchCommand: fix fetchSubmodules to work on a Ref to a blob Silence API warnings introduced by I466dcde6 Allow the exclusions of refs prefixes from bitmap PackWriterBitmapPreparer: do not include annotated tags in bitmap BatchingProgressMonitor: avoid int overflow when computing percentage Speedup GC listing objects referenced from reflogs FileSnapshotTest: Add more MISSING_FILE coverage Change-Id: Ib5055f2f3b8a313c178d6f6c7c5630285ad5a726
| | * | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-02-011-113/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Shortcut during git fetch for avoiding looping through all local refs FetchCommand: fix fetchSubmodules to work on a Ref to a blob Silence API warnings introduced by I466dcde6 Allow the exclusions of refs prefixes from bitmap PackWriterBitmapPreparer: do not include annotated tags in bitmap BatchingProgressMonitor: avoid int overflow when computing percentage Speedup GC listing objects referenced from reflogs FileSnapshotTest: Add more MISSING_FILE coverage Change-Id: I58ad4c210a5e7e5a1ba6b22315b04211c8909950
| | | * | Silence API warnings introduced by I466dcde6Matthias Sohn2023-01-311-5/+43
| | | | | | | | | | | | | | | | | | | | Change-Id: I510510da34d33757c2f83af8cd1e26f6206a486a
| | | * | Speedup GC listing objects referenced from reflogsMatthias Sohn2023-01-231-20/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GC needs to get a ReflogReader for all existing refs to list all objects referenced from reflogs. The existing Repository#getReflogReader method accepts the ref name and then resolves the Ref to create a ReflogReader. GC calling that for a huge number of Refs one by one is very slow. GC first gets all Refs in bulk and then calls getReflogReader for each of them. Fix this by adding another getReflogReader method to Repository which accepts a Ref directly. This speeds up running JGit gc on a mirror clone of the Gerrit repository from 15:36 min to 1:08 min. The repository used in this test had 45k refs, 275k commits and 1.2m git objects. Change-Id: I474897fdc6652923e35d461c065a29f54d9949f4
* | | | | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-01-051-0/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Introduce core.trustPackedRefsStat config Fix documentation for core.trustFolderStat Change-Id: Ic78630f74c72624932a384eed52ef79ae1eff3e5
| * | | | Introduce core.trustPackedRefsStat configKaushik Lingarkar2023-01-051-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we always read packed-refs file when 'trustFolderStat' is false. Introduce a new config 'trustPackedRefsStat' which takes precedence over 'trustFolderStat' when reading packed refs. Possible values for this new config are: * always: Trust packed-refs file attributes * after_open: Same as 'always', but refresh the file attributes of packed-refs before trusting it * never: Always read the packed-refs file * unset: Fallback to 'trustFolderStat' to determine if the file attributes of packed-refs can be trusted Folks whose repositories are on NFS and have traditionally been setting 'trustFolderStat=false' can now get some performance improvement with 'trustPackedRefsStat=after_open' as it refreshes the file attributes of packed-refs (at least on some NFS clients) before considering it. For example, consider a repository on NFS with ~500k packed-refs. Here are some stats which illustrate the improvement with this new config when reading packed refs on NFS: trustFolderStat=true trustPackedRefsStat=unset: 0.2ms trustFolderStat=false trustPackedRefsStat=unset: 155ms trustFolderStat=false trustPackedRefsStat=after_open: 1.5ms Change-Id: I00da88e4cceebbcf3475be0fc0011ff65767c111 Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | Remove unused API problem filtersMatthias Sohn2022-11-201-66/+0
|/ / / / | | | | | | | | | | | | Change-Id: I890716bc052dcce2ce136040035b442247c08332
* | | | Silence API errorsMatthias Sohn2022-11-201-29/+12
| | | | | | | | | | | | | | | | Change-Id: I07c42fe9417edb0570dd475a7e935112a878a93b
* | | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2022-11-201-1/+102
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Silence API errors Silence API warnings Change-Id: I2b8336652e60dec97666582cf9331c8505729473
| * | | Silence API errorsMatthias Sohn2022-11-201-0/+24
| | | | | | | | | | | | | | | | Change-Id: Ie112b2099ea2125bc85863524e56f09ba4907373
| * | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-11-201-2/+79
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Silence API warnings Change-Id: If5ab988a0e177c37b125e0b10625e506eeb2a74f
| | * | Silence API warningsMatthias Sohn2022-11-201-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduced by - addition of configurable SHA1 implementation in 5.13.2 - 3-digit @since 5.9.1 annotations on GitServlet methods Change-Id: If19853fcc5e3677e5b18e8e3fbbcd2773378dffc
* | | | [checkout] Use .gitattributes from the commit to be checked outThomas Wolf2022-03-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit used only one set of attributes constructed from the global and info attributes, plus the attributes from working tree, index, and HEAD. These attributes must be used to determine whether the working tree is dirty. But for actually checking out a file, one must use the attributes from global, info, and *the commit to be checked out*. Otherwise one may not pick up definitions that are only in the .gitattributes of the commit to be checked out or that are changed in that commit with respect to the attributes currently in HEAD, the index, or the working tree. Maintain in TreeWalk different Attributes per tree, and add operations to determine EOL handling and smudge filters per tree. Use the new methods in DirCacheCheckout and ResolveMerger. Note that merging in JGit actually used the attributes from the base, not those from ours, which looks dubious at least. It now uses those from ours, and for checking out the ones from theirs. The canBeContentMerged() determination was also done from the base attributes, and is newly done from the ours attributes. Possibly this should take into account all three attributes, and only if all three agree the item can be content merged, a content merge should be attempted? (What if the binary/text setting changes between base, ours, or theirs?) Also note that JGit attempts to perform content merges on non-binary LFS files; there it used the filter attribute from base, too, even for the ours and theirs versions. Newly it takes the filter attribute from the correct tree. I'm not convinced doing content merges on potentially huge files like LFS files is really a good idea. Add tests in FilterCommandsTest and LfsGitTest to verify the behavior. Open question: using index and working tree as fallback for the attributes of ours (assuming it is HEAD) is OK. But does it also make sense for base and theirs in merging? Bug: 578707 Change-Id: I0bf433e9e3eb28479b6272e17c0666e175e67d08 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | Describe: add support for core.abbrev config optionMatthias Sohn2022-03-021-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If core.abbrev is unset or "auto" estimate abbreviation length like C git does: - Estimate repository's object count by only considering packed objects, round up to next power of 2 - With the order of 2^len objects, we expect a collision at 2^(len/2). But we also care about hex chars, not bits, and there are 4 bits per hex. So all together we need to divide by 2; but we also want to round odd numbers up, hence adding one before dividing. - For small repos use at least 7 hexdigits - If object database fails to determine object count use 7 hexdigits as fallback If it is set to "no" do not abbreviate object-ids. Otherwise set it to the configured value capped to the range between 4 and length of an unabbreviated object-id. Change-Id: I425f9724b69813dbb57872466bf2d2e1d6dc72c6
* | | | Add a typed config getter for integers confined to a rangeMatthias Sohn2022-03-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Use Integer#MIN_VALUE to denote unset option. Change-Id: I4d65f2434013111f25520c0ed2b9a9dc8123c6cf
* | | | Support for git config push.defaultThomas Wolf2022-02-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhance the (unused!?) PushConfig; include a PushDefault enumeration. Add simple tests for this PushConfig. Bug: 351314 Change-Id: Ibc5656a2a1fccf70d00c5e15de8ed3dd8add6337 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | Merge branch 'stable-6.0'Matthias Sohn2022-02-091-0/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Stop initCause throwing in readAdvertisedRefs Change-Id: I2266814c613fd81e9dfc722532ac3daa30ca66b5
| * | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-02-091-0/+12
|/| | | | |/ / | | | | | | | | | | | | | | | * stable-5.13: Stop initCause throwing in readAdvertisedRefs Change-Id: I94251601aa7fae9cc65164eaddcf16471874b11e
| * | Stop initCause throwing in readAdvertisedRefsDarius Jokilehto2022-02-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BasePackConnection::readAdvertisedRefsImpl was creating an exception by calling `noRepository`, and then blindly calling `initCause` on it. As `noRepository` can be overridden, it's not guaranteed to be missing a cause. BasePackPushConnection overrides `noRepository` and initiates a fetch, which may throw a `NoRemoteRepositoryException` with a cause. In this case calling `initCause` threw an `IllegalStateException`. In order to throw the correct exception, we now return the BasePackPushConnection exception and suppress the one thrown by BasePackConnection Bug: 578511 Change-Id: Ic1018b214be1e83d895979ee6c7cbce3f6765f6f
* | | Enable compiler option --releaseMatthias Sohn2021-09-292-3/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures the compiler compiles against the public, supported and documented API for a specific VM version (here 11) [1]. This also means that we don't need EE descriptors in Eclipse anymore in order to ensure that only supported APIs of the selected Java version can be used. According to [2] if option --release is used --source and --target options can't be used. While we are at it also add default value for all new jdt core options added in Eclipse 4.21. [1] https://docs.oracle.com/en/java/javase/11/tools/javac.html [2] https://docs.oracle.com/en/java/javase/14/docs/specs/man/javac.html#option-release Change-Id: I852a5d7b0a3210751c15d79ec91915b4c01c41e2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Bump minimum required Java version to 11Matthias Sohn2021-09-291-3/+3
| | | | | | | | | | | | | | | | | | Bug: 569917 Change-Id: Ifdcdb022a3f29321b4d10da1cc34acca68ed7b03 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Removed unused API filtersMatthias Sohn2021-09-151-27/+0
|/ / | | | | | | Change-Id: I39f7173879f64b1cd508990927d4e732f345724e
* | Silence API error for new interface method ProtocolV2Hook#onObjectInfoMatthias Sohn2021-09-011-0/+8
| | | | | | | | Change-Id: Ie4d09db2b89f26bc6ceb4e84f10c7e66b0ff684f
* | searchForReuse might impact performance in large repositoriesFabio Ponciroli2021-06-251-0/+8
|/ | | | | | | | | | | | | | The search for reuse phase for *all* the objects scans *all* the packfiles, looking for the best candidate to serve back to the client. This can lead to an expensive operation when the number of packfiles and objects is high. Add parameter "pack.searchForReuseTimeout" to limit the time spent on this search. Change-Id: I54f5cddb6796fdc93ad9585c2ab4b44854fa6c48
* Fix @since tag for introduction of PUBKEY_ACCEPTED_ALGORITHMSMatthias Sohn2021-05-141-0/+11
| | | | | | This constant was shipped with 5.11.1. Change-Id: I480dbefab1cccca78cefbc709b79e5405f8bf8cd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove unused API problem filtersMatthias Sohn2021-03-131-57/+0
| | | | Change-Id: I34be8afa42971b94d86312ff8b672b133cd23d45 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* GitHook: use generic OutputStream instead of PrintStreamMatthias Sohn2021-02-151-0/+30
| | | | Change-Id: I15e64dc963c9d27dc9c8de4976dd63f74b918b15 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Move reachability checker generation into the ObjectReader objectTerry Parker2021-01-281-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reachability checkers are retrieved from RevWalk and ObjectWalk objects: * RevWalk.createReachabilityChecker() * ObjectWalk.createObjectReachabilityChecker() Since RevWalks and ObjectWalks are themselves directly instantiated in hundreds of places (e.g. UploadPack...) overriding them in a consistent way requires overloading 100s of methods, which isn't feasible. Moving reachability checker generation to a more central place solves that problem. The ObjectReader object seems a good place from which to get reachability checkers, because reachability checkers return information about relationships between objects. ObjectDatabases delegate many operations to ObjectReaders, and reachability bitmaps are attached to ObjectReaders. The Bitmapped and Pedestrian reachability checker objects were package private in the org.eclipse.jgit.revwalk package. This change makes them public and moves them to the org.eclipse.jgit.internal.revwalk package. Corresponding tests are also moved. Motivation: 1) Reachability checking algorithms need to scale. One of the internal Android repositories has ~2.4 million refs/changes/* references, causing bad long tail performance in reachability checks. 2) Reachability check performance is impacted by repository topography: number of refs, number of objects, amounts of related vs. unrelated history. 3) Reachability check performance is also affected by per-branch access (Gerrit branch permissions) since different users can see different branches. 4) Reachability check performance isn't affected by any state in a RevWalk or ObjectWalk. I don't yet know if a single algorithm will work for all cases in #2 and #3. We may need to evolve the ReachabilityChecker interfaces over time to solve the Gerrit branch permissions case, or use Gerrit-specific identity information to solve that in an efficient way. This change takes the existing public API and moves it to the ObjectReader/whole repository level, which is where we can do consistent customizations for #2 and #3. We intend to upstream the best of whatever works, but anticipate the need for multiple rounds of experimentation. Change-Id: I9185feff43551fb387957c436112d5250486833d Signed-off-by: Terry Parker <tparker@google.com>
* Revert "Remove unused API problem filters"Matthias Sohn2020-12-221-0/+11
| | | | | | | | | This reverts commit 022b02dea10612cb01f9694212b72bd1bbd69cb9. Removing this API warning filter was wrong since we intentionally removed the config constant CONFIG_REFSTORAGE_REFTREE. Change-Id: Ie068e539157cc2312efc8a07feabeb0dd2f75096 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove unused API problem filtersMatthias Sohn2020-12-171-11/+0
| | | | | Change-Id: Id533cf598cd37c277b4de06fdd8ae74cfeede4d0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove unused API problem filtersMatthias Sohn2020-12-151-52/+0
| | | | Change-Id: I982f21dfaec4e35818eca7a4793e24a2cec4e467 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>