summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Silence API errors introduced by 093fbbd1Matthias Sohn2020-03-051-0/+8
| | | | Change-Id: I1c9d5a25bd06a1152e953c45b683375cb05aa254 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Bump Bazel version to 2.2.0David Pursehouse2020-03-051-1/+1
| | | | | Change-Id: I889052040f31708c6b8de0cf3c171a04722f7c96 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Expose FileStoreAttributes.setBackground()Alex Blewitt2020-03-041-1/+12
| | | | | | | | | | | | | | | | | | | | | The FS.setAsyncFileStoreAttributes() static method calls FileStoreAttributes.setBackground() as its implementation, but there are other public attributes on this inner class already and there isn't a real reason why this needs to be private. By making it public we allow callers to be able to invoke it directly. Although it doesn't appear that it would make a difference, by calling a static method on the FS class, all static fields and the transitive closure of class dependencies must be loaded and initialised, which can be non-trivial. Callers referring to FS.setAsyncFileStoreAttributes() may be replaced with FS.FileStoreAttributes.setBackground() with no change of behaviour other than improved performance due to less class loading required. Bug: 560527 Change-Id: I9538acc90da8d18f53fd60d74eb54496857f93a5 Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
* Update reftable storage repo layoutHan-Wen Nienhuys2020-03-046-52/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | The change Ic0b974fa (c217d33, "Documentation/technical/reftable: improve repo layout") defines a new repository layout, which was agreed with the git-core mailing list. It addresses the following problems: * old git clients will not recognize reftable-based repositories, and look at encompassing directories. * Poorly written tools might write directly into .git/refs/heads/BRANCH. Since we consider JGit reftable as experimental (git-core doesn't support it yet), we have no backward compatibility. If you created a repository with reftable between mid-Nov 2019 and now, you can do the following to convert: mv .git/refs .git/reftable/tables.list git config core.repositoryformatversion 1 git config extensions.refStorage reftable Change-Id: I80df35b9d22a8ab893dcbe9fbd051d924788d6a5 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Cygwin expects forward slashes for commands to be run via sh.exeThomas Wolf2020-02-281-1/+1
| | | | | | | | | | | | | | | | | FS_Win32_Cygwin replaces backslashes by / as a side-effect of relativize(). When support for core.hooksPath was added, paths were relativized in a different place using Path.resolve(), which doesn't do that transformation. As a result hooks could not be run on Cygwin in some cases. Do the transformation in FS_Win32_Cygwin.runInShell(). In all other places, File or Path objects are used, which give no guarantee about the file separator (typically the system-dependent default separator), so doing the transformation earlier still wouldn't guarantee that sh.exe indeed gets a command string using forward slashes. Bug: 558577 Change-Id: I3c07eb85f0ac7c5628a2e92f990e5cdb7ecf532f Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Make Logger instances finalDavid Pursehouse2020-02-276-6/+7
| | | | | Change-Id: Ibb997952917e47bc31a8cbe3863623bc959a8100 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Move array designators from the variable to the typeDavid Pursehouse2020-02-2711-14/+14
| | | | | | | | | | | As reported by Sonar Lint: Array designators should always be located on the type for better code readability. Otherwise, developers must look both at the type and the variable name to know whether or not a variable is an array. Change-Id: If6b41fed3483d0992d402d8680552ab4bef89ffb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Revert "Prepend hostname to subsection used to store file timestamp resolution"Matthias Sohn2020-02-221-3/+2
| | | | | | | | | | | | | | | This reverts commit e102bbed995f0e6d3a1a8e5db6d08f9804fd3260. Resolving the hostname comes with a performance penalty. We no longer store the timestamp resolution in the global git config which might be copied around to other machines but in a dedicated jgit config meant for automatically determined options like timestamp resolution. Hence there is no strong reason anymore to have a hardware specific identifier in the subsection name of file timestamp resolution options. Bug: 560414 Change-Id: If8dcabe981eb1792db84643850faa6033f14b1cf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* SimilarityRenameDetector: Fix inconsistent indentationDavid Pursehouse2020-02-191-4/+4
| | | | | | | Replace space indentation with tab indentation Change-Id: Ic130d3bde5d3a73d8f5c6225974153573722d05b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Use indexOf(char) and lastIndexOf(char) rather than String versionsDavid Pursehouse2020-02-196-8/+9
| | | | | | | | | | | | | An indexOf or lastIndexOf call with a single letter String can be made more performant by switching to a call with a char argument. Found with SonarLint. As a side-effect of this change, we no longer need to suppress the NON-NLS warnings. Change-Id: Id44cb996bb74ed30edd560aa91fd8525aafdc8dd Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Reorder modifiers to follow Java Language SpecificationDavid Pursehouse2020-02-1946-75/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Java Language Specification recommends listing modifiers in the following order: 1. Annotations 2. public 3. protected 4. private 5. abstract 6. static 7. final 8. transient 9. volatile 10. synchronized 11. native 12. strictfp Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order. This was detected using SonarLint. Change-Id: I9cddecb4f4234dae1021b677e915be23d349a380 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* GitmoduleEntry: Remove redundant import of class from same packageDavid Pursehouse2020-02-191-2/+0
| | | | | Change-Id: I613489a937dd53780b0abfd6b1bd0ed964a5ddd8 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Remove redundant "static" qualifier from enum declarationsDavid Pursehouse2020-02-1932-41/+41
| | | | | | | Nested enum types are implicitly static. Change-Id: Id3d7886087494fb67bc0d080b4a3491fb4baac19 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Update API problem filterMatthias Sohn2020-02-141-9/+1
| | | | Change-Id: Iced4e3cc68cc9c2a75f9bf5befd6db7ce2fb1374 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.6.2-SNAPSHOT buildsMatthias Sohn2020-02-1475-455/+463
| | | | | Change-Id: Ie04d749bf16eea6db5e5c98be54ba093ca249d05 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v5.6.1.202002131546-rv5.6.1.202002131546-rMatthias Sohn2020-02-1374-105/+105
| | | | | Change-Id: I2807b9a9f7e8b877b72702ebd1f70c4f9f223481 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Simplify ReftableCompactorHan-Wen Nienhuys2020-02-126-90/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ReftableCompactor supported a byteLimit, but this is currently unused. The FileReftableStack has a more sophisticated strategy that amortizes compaction costs. Rename min/maxUpdateIndex to reflogExpire{Min,Max}UpdateIndex to reflect their purpose more accurately. Since reflogs are generally pruned chronologically (oldest entries are expired first), one can only prune entries on full compaction, so they should not be set by default. Rephrase the function Reader#minUpdateIndex and maxUpdateIndex. These vars are documented to affect log entries, but semantically, they are about ref entries. Since ref entries have their timestamps delta-compressed, it is important for the min/maxUpdateIndex values to be coherent between different tables. The logical timestamps for log entries do not have to be coherent in different tables, as the timestamps of a log entry is part of the key. For example, a table written at update index 20 may contain a tombstone log entry at timestamp 1. Therefore, we set ReftableWriter's min/maxUpdateIndex from the merged tables we are compacting, rather than from the compaction settings (which should only control reflog expiry.) The previous behavior could drop log entries erroneously, especially in the presence of tombstone log entries. Unfortunately, testing this properly requires both an API for adding log tombstones, and a more refined API for controlling automatic compaction. Hence, no test. Change-Id: I2f4eb7866f607fddd0629809e8e61f0b9097717f Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* Bump required Bazel version to 2.1.0David Pursehouse2020-02-121-1/+1
| | | | | Change-Id: I2e4f44a8d591ba26c14189fc46ead0feaef187c3 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Upgrade bazlets to the latest master revisionDavid Pursehouse2020-02-121-1/+1
| | | | | | | Includes "Use now mandatory https protocol for MAVEN_CENTRAL". Change-Id: I4e83bf9a01f1d2a3bea4ce855709fd33e624fe9a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Change the wildcard import to explicit ones.Yunjie Li2020-02-121-1/+4
| | | | | Change-Id: Ia7bc1c4b6b82c127e1e4e0e657f69d249684e8e6 Signed-off-by: Yunjie Li <yunjieli@google.com>
* Merge branch 'stable-5.5' into stable-5.6Matthias Sohn2020-02-110-0/+0
|\ | | | | | | | | | | | | | | | | | | * stable-5.5: Prepare 5.3.8-SNAPSHOT builds JGit v5.3.7.202002110540-r Prepare 5.1.14-SNAPSHOT builds JGit v5.1.13.202002110435-r Change-Id: I67e7b9994aff40b05792bee2306476cf749723e0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2020-02-110-0/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Prepare 5.3.8-SNAPSHOT builds JGit v5.3.7.202002110540-r Prepare 5.1.14-SNAPSHOT builds JGit v5.1.13.202002110435-r Change-Id: I44b39161f775a52795f6bff312a27227e893651e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2020-02-110-0/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Prepare 5.3.8-SNAPSHOT builds JGit v5.3.7.202002110540-r Prepare 5.1.14-SNAPSHOT builds JGit v5.1.13.202002110435-r Change-Id: I075f8b8f97a5e97602c058770fe12164af2ce66a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Prepare 5.3.8-SNAPSHOT buildsMatthias Sohn2020-02-1169-428/+428
| | | | | | | | | | | | | | | | | | | | Change-Id: I64ef3b4cf30e87d058001c2c6f1458f4b0c1df00 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * JGit v5.3.7.202002110540-rv5.3.7.202002110540-rMatthias Sohn2020-02-1169-90/+90
| | | | | | | | | | | | | | | | | | | | Change-Id: I3ba41af516b9d3b74ac580b3e170ad0e6e0663d4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2020-02-110-0/+0
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Prepare 5.1.14-SNAPSHOT builds JGit v5.1.13.202002110435-r Change-Id: I78cbed22c0f0f5872fa44b9a564f6d31dcace582
| | | | * Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2020-02-110-0/+0
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Prepare 5.1.14-SNAPSHOT builds JGit v5.1.13.202002110435-r Change-Id: I57fc818e719bc94f90ab1aeb34016eea74d84719 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Prepare 5.1.14-SNAPSHOT buildsMatthias Sohn2020-02-1157-360/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic7d6f1a6c3123af1a1fa782f052b0cea3b6f28c6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * JGit v5.1.13.202002110435-rv5.1.13.202002110435-rMatthias Sohn2020-02-1157-60/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iedc8699ad1a24efe7ddb47ae919c75b9d36141d4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | reftable: don't check deadline on the first tryHan-Wen Nienhuys2020-02-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps debug stepping. Change-Id: I020dafab4ffac75e6df0dbcde0ed4805c7867f72 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* | | | | | reftable: clarify commentHan-Wen Nienhuys2020-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I16e32aeb325b604eb31f84db18a214f792395941 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | reftable: clear cache on full compactionHan-Wen Nienhuys2020-02-112-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merged table contains handles to open files. A full compaction causes those files to be closed, and so further lookups would fail with EBADF. Change-Id: I7bb74f7228ecc7fec9535b00e56a617a9c18e00e Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | reftable: remove outdated commentHan-Wen Nienhuys2020-02-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: I41a7d9934d53553b5f81f40ff9d663378676ac5d
* | | | | | reftable: clarify that LogCursor may return a null ReflogEntryHan-Wen Nienhuys2020-02-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1a4d5c262cd196dca37876aec00bb974a45e9fcd Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* | | | | | Restore behavior of CloneCommandThomas Wolf2020-02-042-16/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6216b0de changed the behavior of the setMirror(), setCloneAllBranches(), and setBranchesToClone() operations. Before that commit, these could be set and reset independently and only in call() it would be determined what exactly to do. Since that commit, the last of these calls would determine the operation. This means that the sequence cloneCommand.setCloneAllBranches(true); cloneCommand.setBranchesToClone(/* some list of refs */); would formerly do a "clone all" giving a fetch refspec with wildcards +refs/heads/*:refs/remotes/origin/* which picks up new upstream branches, whereas since commit 6216b0de individual non-wildcard fetch refspecs would be generated and new upstream branches would not be fetched anymore. Undo this behavioral change. Make the operations independently settable and resettable again, and determine the exact operation only in call(): mirror=true > cloneAll=true > specific refs, where ">" means "takes precedence over", and if none is set assume cloneAll=true. Note that mirror=true implies setBare(true). Bug: 559796 Change-Id: I7162b60e99de5e3e512bf27ff4113f554c94f5a6 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | Merge branch 'stable-5.5' into stable-5.6Matthias Sohn2020-02-0110-107/+540
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I73d16b53df02bf735c2431588143efe225a4b5b4
| * | | | | Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2020-02-0110-115/+540
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I76a62da98182f0c504b1ea8b7d37cecdf4eea7e0
| | * | | | Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2020-02-0110-107/+540
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I12002dbfed9dff14fc6d2df9787d92eab5b1fa78
| | | * | | Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2020-02-0110-107/+540
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.2: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I790098be00ff3f9b8278d54ae4fb7c11311816e9
| | | | * | Merge branch 'stable-5.1' into stable-5.2David Pursehouse2020-02-018-86/+466
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Fix string format parameter for invalidRefAdvertisementLine WindowCache: add metric for cached bytes per repository pgm daemon: fallback to user and system config if no config specified WindowCache: add option to use strong refs to reference ByteWindows Change-Id: I741059a1d0d5950ab5bc16ec70352655ee926a24 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Fix string format parameter for invalidRefAdvertisementLineDavid Pursehouse2020-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The externalized error message added in f4fc640 ("BasePackConnection: Check for expected length of ref advertisement", Dec 18, 2019) uses a malformed string format. Since there is only one formatting argument, it should be referenced with '{0}' rather than '{1}'. Change-Id: Ibda864dfb0bb902fe07ae4bba73117b212046e8a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | | | | * WindowCache: add metric for cached bytes per repositoryMatthias Sohn2020-01-282-10/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ObjectDatabase and PackFile don't know their repository use the packfile's grand-grand-parent directory as an identifier for the repository the packfile resides in. Remove metric for a repository if the number of cached bytes for the repository drops to 0 in order to ensure the map of cached bytes per repository doesn't contain repositories which have no data cached in the WindowCache. Change-Id: I969ab8029db0a292e7585cbb36ca0baa797da20b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * pgm daemon: fallback to user and system config if no config specifiedMatthias Sohn2020-01-281-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a config file is passed via option --config-file then use only the options defined in that file. This helps to concisely configure the daemon without side effects from global and system level git configs. Otherwise fallback to user and system level configs. Change-Id: I242de248f257579874ad0bfe4882a22502353b1f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * WindowCache: add option to use strong refs to reference ByteWindowsMatthias Sohn2020-01-205-70/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Java GC evicts all SoftReferences when the used heap size comes close to the maximum heap size. This means peaks in heap memory consumption can flush the complete WindowCache which was observed to have negative impact on performance of upload-pack in Gerrit. Hence add a boolean option core.packedGitUseStrongRefs to allow using strong references to reference packfile pages cached in the WindowCache. If this option is set to true Java gc can no longer flush the WindowCache to free memory if the used heap comes close to the maximum heap size. On the other hand this provides more predictable performance. Bug: 553573 Change-Id: I9de406293087ab0fa61130c8e0829775762ece8d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * | Merge branch 'stable-5.1' into stable-5.2David Pursehouse2020-01-175-21/+74
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.1: Replace usage of ArrayIndexOutOfBoundsException in treewalk Add config constants for WindowCache configuration options Change-Id: I17da3c5183eca536aa2be3972bc5df45c9d75f1b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Replace usage of ArrayIndexOutOfBoundsException in treewalkPatrick Hiesel2020-01-092-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using exceptions during normal operations - for example with the desire of expanding an array in the failure case - can have a severe performance impact. When exceptions are instantiated, a stack trace is collected. Generating stack trace can be expensive. Compared to that, checking an array for length - even if done many times - is cheap since this is a check that can run in just a handful of CPU cycles. Change-Id: Ifaf10623f6a876c9faecfa44654c9296315adfcb Signed-off-by: Patrick Hiesel <hiesel@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Add config constants for WindowCache configuration optionsMatthias Sohn2020-01-093-12/+82
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icc5265f87ae58aa1e667ed1827075c4a30f75c32 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | Merge branch 'stable-5.5' into stable-5.6Matthias Sohn2020-01-0911-60/+610
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.5: Fix API problem filters Fix unclosed resource warning in SmartOutputStream JschConfigSessionFactory: fix boxing warning SshSupport#runSshCommand: don't throw exception in finally block Don't override already managed maven-compiler-plugin version Remove unused import from CreateFileSnapshotBenchmark Remove duplicate ignore_optional_problems entry in .classpath Update maven-site-plugin used by benchmark module to 3.8.2 Add dependency to enable site generation for benchmark module Ignore warnings for generated source code in org.eclipse.jgit.benchmark Fix MBean registration Enhance WindowCache statistics Change-Id: I11f9a387ac3dc7d22a4f2e70bb8d89169b4e9afe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | | | Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2020-01-0912-59/+605
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: Fix API problem filters Fix unclosed resource warning in SmartOutputStream JschConfigSessionFactory: fix boxing warning SshSupport#runSshCommand: don't throw exception in finally block Don't override already managed maven-compiler-plugin version Remove unused import from CreateFileSnapshotBenchmark Remove duplicate ignore_optional_problems entry in .classpath Update maven-site-plugin used by benchmark module to 3.8.2 Add dependency to enable site generation for benchmark module Ignore warnings for generated source code in org.eclipse.jgit.benchmark Fix MBean registration Enhance WindowCache statistics Change-Id: I78902d5feecb2c09134b64ec2f3b48b2c3bab37d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * | | | Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2020-01-0912-59/+605
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.3: Fix API problem filters Fix unclosed resource warning in SmartOutputStream JschConfigSessionFactory: fix boxing warning SshSupport#runSshCommand: don't throw exception in finally block Don't override already managed maven-compiler-plugin version Remove unused import from CreateFileSnapshotBenchmark Remove duplicate ignore_optional_problems entry in .classpath Update maven-site-plugin used by benchmark module to 3.8.2 Add dependency to enable site generation for benchmark module Ignore warnings for generated source code in org.eclipse.jgit.benchmark Fix MBean registration Enhance WindowCache statistics Change-Id: I1b560b36d169cfa02cc5450ad0fa0bd85f9f42d8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>