aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | [errorprone] RawParseUtils@parseHexInt64: suppress IntLongMathMatthias Sohn2023-09-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see https://errorprone.info/bugpattern/IntLongMath Change-Id: I71acd5eec252b8c43d7c411f513e502694830727
* | | | | | | | | | [errorprone] Exceptions should not override #toStringMatthias Sohn2023-09-252-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of overriding #toString provide getter for additional information so that code handling the exception can access it. See https://errorprone.info/bugpattern/OverrideThrowableToString Change-Id: Ie577ae9327e0234d55481253f2604b1644ea3f01
* | | | | | | | | | [errorprone] Fix invalid param in javadocMatthias Sohn2023-09-254-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://errorprone.info/bugpattern/InvalidParam Change-Id: Ife74575bb4080c3386affbfbaf9373931d72c3f3
* | | | | | | | | | [errorprone] FS#searchPath: handle surprising behavior of String#splitMatthias Sohn2023-09-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://errorprone.info/bugpattern/StringSplitter Change-Id: Ic80f6c53ea96537ed4d046621e774288fced7ce1
* | | | | | | | | | [errorprone] FileStoreAttributes#FUTURE_RUNNER: Fix corePoolSizeMatthias Sohn2023-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ErroneousThreadPoolConstructorChecker] Thread pool size will never go beyond corePoolSize if an unbounded queue is used. see https://errorprone.info/bugpattern/ErroneousThreadPoolConstructorChecker Change-Id: Icdeaffa05301567611682da86130440f863f2ecc
* | | | | | | | | | [errorprone] Express duration using seconds which is clearerMatthias Sohn2023-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [CanonicalDuration] Duration can be expressed more clearly with different units. see https://errorprone.info/bugpattern/CanonicalDuration Change-Id: I7f358b5adabee1523e56b109a2c81c74ec523b74
* | | | | | | | | | [errorprone] Use ArrayList instead of LinkedListMatthias Sohn2023-09-223-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [JdkObsolete] It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. see https://errorprone.info/bugpattern/JdkObsolete Change-Id: I13fb953f55fc7b6e007d6fd6a6a1bfd377773588
* | | | | | | | | | [errorprone] AddCommand#filepattern: use a more specific typeMatthias Sohn2023-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variable type can use a more specific type to convey more information to callers. private Collection<String> filepatterns; ^ (see https://errorprone.info/bugpattern/PreferredInterfaceType) Change-Id: I68b74de65aba3bb849ef508d7dcdd8b85b0ab100
* | | | | | | | | | [errorprone] Suppress UnnecessaryParenthesesMatthias Sohn2023-09-222-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for the sake of readability. See https://errorprone.info/bugpattern/UnnecessaryParentheses Change-Id: I8444db78c408d4e8bd71bf7e575b9af637900629
* | | | | | | | | | [errorprone] Remove unnecessary parenthesesMatthias Sohn2023-09-2215-21/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see https://errorprone.info/bugpattern/UnnecessaryParentheses Change-Id: Id08cf0e05b3d35f139fc34e0aa83882555a8a81a
* | | | | | | | | | DfsPackFile: remove unnecessary @SuppressWarnings("boxing")Matthias Sohn2023-09-221-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7af999dc4434b7b57bb7e0b84b9b64d24efce220
* | | | | | | | | | CommitGraphWriter: Remove unnecessary semicolonMatthias Sohn2023-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8ea87d0ff3be8a541e72210f0da7fec1f43008e8
* | | | | | | | | | CommitGraphWriter: fix boxing warningsMatthias Sohn2023-09-222-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I35c3a3baadb8d7d73c01252fe4333fa2159722ee
* | | | | | | | | | CommitGraphWriter#createCoreChunks: Remove not-thrown exceptionsMatthias Sohn2023-09-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0e6f32ed415dc3a0ccadbeae46c979c378ebb0fc
* | | | | | | | | | CommitGraphWriter: Decouple Stats from computing bloom filtersIvan Frade2023-09-211-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The public stats object is created only to be populated by the computation of bloom filters. Make the computation return its numbers with the results and copy them to the stats when needed. This eliminates the side effects from the computation and makes it easier to add more data to the stats later. Change-Id: I7a5e55fc3a17f5a294edf3a3b725b2d9c0280a5a
* | | | | | | | | | CommitGraphWriter: Move bloom filter calculation out of createChunksIvan Frade2023-09-201-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks confusing that the createChunks method calculates bloom filters. Make the calculations before and pass the result to the method. Change-Id: If6e3c0e644f7f940f268ca7266f577f012278ff3
* | | | | | | | | | [errorprone] Fix wrong comparison which always evaluated to falseMatthias Sohn2023-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java:59: error: [ComparisonOutOfRange] ints may have a value in the range -2147483648 to 2147483647; therefore, this comparison to Integer.MAX_VALUE will always evaluate to false if (table[k] > Integer.MAX_VALUE) { ^ See https://errorprone.info/bugpattern/ComparisonOutOfRange We need to check if variable `uint` of type `long` exceeds the maximum possible int value before casting it to `int` below. This was introduced in Ib5c0d6678cb242870a0f5841bd413ad3885e95f6 Change-Id: I675d594f523084be4c1678328cc343065e32d998
* | | | | | | | | | [errorprone] Remove unnecessary comparisonMatthias Sohn2023-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raised by errorprone: org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java:406: error: [ComparisonOutOfRange] chars may have a value in the range 0 to 65535; therefore, this comparison to 0 will always evaluate to true if (ch >= 0 && ch < inUse.length) { ^ see https://errorprone.info/bugpattern/ComparisonOutOfRange Change-Id: I9625aa7894a34dbffd77d39a40c6e285c86b56d5
* | | | | | | | | | [errorprone] Suppress ImmutableEnumChecker for ShutdownHookMatthias Sohn2023-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here we use enum to implement a singleton. Hence suppress the errorprone error ImmutableEnumChecker. Change-Id: I21f6ed83c08936dfc9aa591af809e69f3053a050
* | | | | | | | | | Use ShutdownHook to gracefully handle JVM shutdownMatthias Sohn2023-09-123-36/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in all classes which already registered their own shutdown hook - CloneCommand - GC#PidLock - FS#FileStoreAttributes - LocalDiskRepositoryTestCase#Cleanup Change-Id: I3efc1f83f3cbbf43eeeaaedcd2bee1ef31971a72
* | | | | | | | | | Add ShutdownHook to cleanup FileLocks on graceful JVM shutdownMatthias Sohn2023-09-123-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should avoid stale lock files if the JVM is terminated gracefully. Implement a ShutdownHook which can register/unregister listeners which need to do some cleanup during graceful JVM shutdown. This hook is registered as a Java shutdown hook and when the JVM shuts down calls #onShutdown of registered listeners using a parallel stream to let them run concurrently. See https://docs.oracle.com/javase/8/docs/technotes/guides/lang/hook-design.html Bug: 582379 Change-Id: I1621dc5f7d9a8c832b6d1b74cbc47578b1c2f0b8
* | | | | | | | | | Unregister ShutdownHook when GC#PidLock is closedMatthias Sohn2023-09-121-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the JVM will accumulate the ShutdownHook objects of all GCs run while the JVM is up. Change-Id: Iadc723a939238a3a75b4ba47f898918eb4554ea3
* | | | | | | | | | RevertCommand: support for inserting a Gerrit change IDThomas Wolf2023-09-081-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a setter for the flag to be passed through to the CommitCommand. Bug: 342790 Change-Id: I87548d7c2742af8af5ef6105115e3ab9c58d1d9f Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | | | | | | | | DfsPackFile: Record index loads only in one placeIvan Frade2023-09-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each index can be set in the reader from two locations: the dfs cache callback or the code afterwards. The pack is emitting the load event in both cases, when the reference is set. This is brittle (right now it is missing events for BITMAP_INDEX and COMMIT_GRAPH). Emit the index loaded event only once, after going through the cache code. The fact that the reference was set in the callback or the main code is irrelevant. Also, the reader is per-thread, so there shouldn't be any concurrency involved triggering double counts. Change-Id: I7f3d078a53741ecc1e81b96353ed8faa8fef3a49
* | | | | | | | | | DfsPackfile: Emit the index load with the index objectIvan Frade2023-09-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DfsReader#emitIndexLoad expects a reference to the loaded object, not to its identity hash. This makes listeneres recalculate an identity hash over an Int object. Pass the expected reference to the method. Change-Id: Iee982fdd0169c93c5c7cd9cfe4260a7a82d23f6a
* | | | | | | | | | Merge branch 'stable-6.7'Matthias Sohn2023-09-079-151/+652
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Prepare 6.7.1-SNAPSHOT builds Switch back to wagon-ssh-external Fix generation of maven site JGit v6.7.0.202309050840-r Remove unused API problem filters [releng] Bump japicmp base version to 6.6.0.202305301015-r Fix list of 3rd party bundles in p2 repo Add missing source bundle org.osgi.service.cm.source to target platform Prepare 6.6.2-SNAPSHOT builds JGit v6.6.1.202309021850-r Checkout: better directory handling Document commit-graph options supported by JGit Fix warning raised for local variable hiding DfsPackFile#index Suppress boxing warnings in DfsPackFile Remove unused API problem filters Suppress boxing warnings in tests Fix warning about empty block Update mockito to 5.5.0 Update byte-buddy to 1.14.7 Prepare 6.7.0-SNAPSHOT builds JGit v6.7.0.202308301100-rc1 Change-Id: Ib2a1000ead5ca6cf3816e9e9496ad5d92f4dc963
| * | | | | | | | | Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2023-09-038-148/+641
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Prepare 6.6.2-SNAPSHOT builds JGit v6.6.1.202309021850-r Checkout: better directory handling Change-Id: Ice82d68b2d343a5fac214807cdb369e486481aab
| | * | | | | | | | Checkout: better directory handlingThomas Wolf2023-09-038-148/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking out a file into the working tree ensure that all parent directories of the file below the working tree root are actually directories and do exist before we try to create the file. When multiple files are to be checked out (or even a whole tree), this may check the same directories over and over again. Asking the file system every time for file attributes is a potentially expensive operation. As a remedy, introduce an in-memory cache of directory states for a particular check-out operation. Apply the same fix also in the ResolveMerger, which may also check out files, and also in the PatchApplier. In PatchApplier, also validate paths. Change-Id: Ie12864c54c9f901a2ccee7caddec73027f353111 Signed-off-by: Thomas Wolf <twolf@apache.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | | | | | Merge branch 'master' into stable-6.7Matthias Sohn2023-09-021-0/+3
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: CommitGraphWriter: throw exception on unknown chunk Change-Id: Iaa0c563917c4195fccd57f5e6839a37008c9b808
| * | | | | | | | | | Fix warning raised for local variable hiding DfsPackFile#indexMatthias Sohn2023-08-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I45cd3be942f798d51af1e024ceb3f4d26c7af324
| * | | | | | | | | | Suppress boxing warnings in DfsPackFileMatthias Sohn2023-08-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4b5a0a7ffdeaf7d7839787aa8b98ea9c72f70850
* | | | | | | | | | | CommitGraphWriter: Make the list of chunks immutableIvan Frade2023-09-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The chunk list is calculated before start writing and it is immutable afterwards. Make this explicit using an unmodifiable list for the chunks. Change-Id: I4a5cfb1f3d06a9393d8d93a3fac3c128cf3faec0
* | | | | | | | | | | CommitGraphWriter: Assert written bytesIvan Frade2023-09-051-0/+12
| |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The final size of the commit-graph is known before-hand. As a safety-net, assert the written size matches the expected value. Change-Id: Ib0828a7cce5bacb33f6325ee3910f4eebd95eb8c
* | | | | | | | | | CommitGraphWriter: throw exception on unknown chunkIvan Frade2023-09-011-0/+3
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CommitGraphWriter first defines the chunks and then writes them. If at write time a chunk is unknown, it is ignored. This is brittle: if somebody adds a chunk to the header but not to the actual writing, the commit-graph is broken and there is no error reported anywhere. Throw exception if at write time a chunk is unknown. This can only happen by a coding error in the writer. Change-Id: Iade677bb6ce368b6941b75a21c622917afa3b751
* | | | | | | | | Handle global git config $XDG_CONFIG_HOME/git/configThomas Wolf2023-08-285-4/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C git uses this alternate fallback location if the file exists and ~/.gitconfig does not. Implement this also for JGit. If both files exist, reading behavior is as if the XDG config was inserted between the HOME config and the system config. Writing behaviour is different: all changes will be applied only in the HOME config. Updates will occur in the XDG config only if the HOME config does not exist. This is consistent with the behavior of C git; compare [1], especially the sections on FILES and SCOPES, and the description of the --global option. [1] https://git-scm.com/docs/git-config Bug: 581875 Change-Id: I2460b9aa963fd2811ed8a5b77b05107d916f2b44 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | | | | | | | IO: use JDK convenience methodsJörg Kubitz2023-08-281-77/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The benefit is that certain InputStreams can override the default implementation for performance reasons. Change-Id: I4c924157ec0f0ec63b0eca7cdbdc9325af24cab6
* | | | | | | | | Introduce core.packedIndexGitUseStrongRefs config keyMartin Fick2023-08-267-80/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a core.packedIndexGitUseStrongRefs configuration key, which defaults to true so that the current behavior does not change. However, setting it to false allows soft references to be used for Pack indices instead of strong references so that they can be garbage collected when there is memory pressure. Pack objects can be large when associated with pack files with large object counts, and this memory is not really accounted for or tracked by the WindowCache and it can be very substantial at times, especially with many large object count projects. A particularly problematic use case is Gerrit's ls-projects command which loads very little data in the WindowCache via ByteWindows, but ends up loading and holding many entire indices in memory, sometimes even after the ByteWindows for their Pack objects have already been garbage collected since they won't get cleared until after a new ByteWindow is loaded. By using SoftReferences, single use indices can get cleared when there is memory pressure and OOMs can be easily avoided, drastically reducing the amount of memory required to perform an ls-projects on large sites with many projects and large object counts. On one of our test sites, an ls-projects command with strong index references requires more than 66GB of heap to complete successfully, with soft index references it requires less than 23GB. Change-Id: I3cb3df52f4ce1b8c554d378807218f199077d80b Signed-off-by: Martin Fick <quic_mfick@quicinc.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Merge "DfsGarbageCollector: provide commit graph stats"Jonathan Tan2023-08-212-2/+17
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | DfsGarbageCollector: provide commit graph statsJonathan Tan2023-08-172-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide commit graph stats in the same way that we provide reftable stats. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Change-Id: Ib80c892a26f9b552bc90f3cbe7da83b02ffebdfd
* | | | | | | | | | DfsReader: Make PackLoadListener interface visible to subclassesIvan Frade2023-08-181-4/+4
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A subclass cannot implement a listener with the default access. Make the interface protected. Not public because so far only subclasses are interested in this interface. We can widen the visibility later if needed. Change-Id: I54e5c0ef1312dfe2fa660bc8fb54e2be35c0f6df
* | | | | | | | | DfsGarbageCollector: put only GC commits into the commit graphIvan Frade2023-08-161-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GC puts all commits reachable from heads and tags into the GC pack, and commits reachable only from other refs (e.g. refs/changes) into GC_REST. The commit-graph contains all commits in GC and GC_REST. This produces too big commit graphs in some repos, beating the purpose of loading the index. Limit the commit graph to commits reachable from heads and tags (i.e. commits in the GC pack). Change-Id: I4962faea5a726d2ea3e548af0aeae370a6cc8588
* | | | | | | | | DfsReader: Expose when indices are loadedIvan Frade2023-08-033-2/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to measure the data used to serve a request. As a first step, we want to know how many indices are accessed during the request and their sizes. Expose an interface in DfsReader to announce when an index is loaded into the reader, i.e. when its reference is set. The interface is more flexible to implementors (what/how to collect) than the existing DfsReaderIOStats object. Change-Id: I56f7658fde1758efaf869fa779d11b533a81a0a7
* | | | | | | | | Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2023-08-032-5/+30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Update to Tycho 4.0.1 Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r Change-Id: I7294c21748897eb3f94eeffbda944b62e3206c0d
| * | | | | | | | Merge branch 'stable-6.5' into stable-6.6Matthias Sohn2023-08-032-6/+31
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.5: Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r Change-Id: Id2e49252a9dc268210c9439848e77604885371aa
| | * | | | | | | Merge branch 'stable-6.4' into stable-6.5Matthias Sohn2023-08-032-6/+31
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.4: Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r Change-Id: Idb6dd6160e023673e3650653a15f6b1c540de96e
| | | * | | | | | Merge branch 'stable-6.3' into stable-6.4Matthias Sohn2023-08-032-6/+31
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.3: Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r Change-Id: I0bccc36d9cc9a36f1be9b1562df35ce3a0e95eee
| | | | * | | | | Merge branch 'stable-6.2' into stable-6.3Matthias Sohn2023-08-032-6/+31
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.2: Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r Change-Id: I589ed444b5cbfc5b073cac91323e2cc97ab98087
| | | | | * | | | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-08-032-6/+31
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r Change-Id: I5b16c3b613a95b7f28c8f6ac0b20c4c593759cea
| | | | | | * | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-08-032-6/+31
| | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r Change-Id: Ib08037f6055dac1776e38cfb4ff8c88a50ad3e60
| | | | | | | * | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-08-032-6/+31
| | | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r Change-Id: I1f50995d9d9c592ec0e02a04e0e409440b49f9f3