- Nov 25, 2024
-
-
Jari-Matti Mäkelä authored
-
- Nov 21, 2024
-
-
Matthias Sohn authored
-
- Nov 20, 2024
-
-
Matthias Sohn authored
* stable-7.0: DiffDriver: fix doc for rust built-in DiffDriver: fix formatting of javadoc Add numberOfObjectsSinceBitmap to RepoStatistics Support built-in diff drivers for hunk header function names Don't fail when trying to prune pack which is already gone Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap Change-Id: I98beec1186132e749a749706f399237de7d7e45e
-
Matthias Sohn authored
* stable-6.10: DiffDriver: fix doc for rust built-in DiffDriver: fix formatting of javadoc Add numberOfObjectsSinceBitmap to RepoStatistics Support built-in diff drivers for hunk header function names Don't fail when trying to prune pack which is already gone Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap Change-Id: I7f18e96cc98c56ee7c5e6256fe9e83957e733aa8
-
Kaushik Lingarkar authored
Change-Id: Ic430686dc41ecbd8d8d19068416bc18ba2d94f3f
-
Matthias Sohn authored
Change-Id: I01da1862719b6623727deae10a706f30ee6cabbf
-
Ivan Frade authored
This code came from GitDateParser and inherited these issues. It is a good time to fix them: * Use always {} in if and fors (eclipse guide) * Use the more efficient EnumMap for the formatters * variable.equals(CONSTANT) instead of CONSTANT.equals(var) https://errorprone.info/bugpattern/YodaCondition * private constructor to prevent instantiations of a utility classes https://errorprone.info/bugpattern/PrivateConstructorForUtilityClass * methods named in camelCase * Use string.split(..., int) https://errorprone.info/bugpattern/StringSplitter * Initialize variable in first use Change-Id: I0ae70ad9befc66fa9c057af135f2b0b2dab3869a
-
Ivan Frade authored
The PersonIdent(PersonIdent,Date) constructor must create a copy with the same author/email/timezone but different time. When we changed the implementation to the new Instant/ZoneId version, we forgot to pass the timezone. This made fail some tests downstream. Pass the timezone when constructing the copy. Change-Id: Iaa979e6dbaa3c55d4c4d2040068ab8b03163cd4e
-
Ivan Frade authored
In [1], the @since tag of #getZoneId was updated to 7.1 by mistake. The implementation of the method is different but the API hasn't changed. Revert the tag to 6.1, when the method was introduced. [1] https://gerrithub.io/c/eclipse-jgit/jgit/+/1204142/9/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java Change-Id: If71d763ac28d4ec02bfebb1e65f56227f44e027d
-
Matthias Sohn authored
* changes: tests/BasicTest: Use java.time constructors for PersonIdent RawParseUtils test: Use java.time to create PersonIdents
-
Matthias Sohn authored
-
Jacek Centkowski authored
Introduce a numberOfObjectsSinceBitmap that contains the number of objects stored in pack files and as loose objects created since the latest bitmap generation. Note that the existing GcNumberOfPackFilesAfterBitmapStatisticsTest.java was renamed to GcSinceBitmapStatisticsTest.java and extended to cover also this statistic. Change-Id: I8ae1db142ddfcd42a5a1d6da01bc67f695562e0e
-
Luca Milanesio authored
-
Matthias Sohn authored
-
Kaushik Lingarkar authored
The regexes defined for each built-in driver will be used to determine the function name for a hunk header. Each driver can specify a list of regexes to negate and match. They can also define pattern compilation flags if needed. These drivers only apply to text files with unified patch type. Following built-in drivers have been added: - cpp - dts - java - python - rust Support for more languages can be added as needed to match the cgit implementation. Change-Id: Ice5430bfed7e4aaf9f00e52e44402479984953c5
-
Matthias Sohn authored
-
Jacek Centkowski authored
Update the TestRepository.prunePacked so that it doesn't fail if a pack to be pruned is already gone. It is especially handy when the prunePacked function is called in `TestRepository.packAndPrune` function after the repo moves on after GC was performed. Change-Id: I01b4ddbaddec1fdc24cfbb967e0edfe0de6c4b7c
-
- Nov 19, 2024
-
-
Ivan Frade authored
Stop using the deprecated constructor with long/int for time/tz and use instead Instant/ZoneId. The code is still using the old constructor, but this verifies that we are creating identical instances. We will update the code later. Change-Id: I3844bf1e790e53e69a894cd697bddb31b755c2e6
-
Ivan Frade authored
The constructor with long/int for time/tz is deprecated in favor of Instant/ZoneId. Update first the expectations in the tests to the new constructors, so we know we are creating the same PersonIdents than before. We update the code later, knowing there is no regression in e.g. format or precision. Change-Id: I05c759bdd4cf73b8afe79fae3c792f2f1300d1e6
-
Matthias Sohn authored
-
Matthias Sohn authored
Change-Id: I6f6ae540b128ff6b965931e829da1368a8b88ddb
-
Matthias Sohn authored
Change-Id: I4efccd72bd567d42e739ee330e26c6b04d5c5c01
-
Matthias Sohn authored
Change-Id: Ib0737f7ec6b9872f6d4514d140e7d32a4a40809d
-
Matthias Sohn authored
Change-Id: I8f5d2f6f1c6244f1b49fee713f7a06c0e9ec549b
-
Ivan Frade authored
From errorprone: Date has a bad API that leads to bugs; prefer java.time.Instant or LocalDate. Replace the long with milliseconds and int with minutes offset with an Instant and a ZoneOffset. Create new constructors and deprecate variants with Date, milliseconds and minute offsets. When comparing instances of PersonIdent truncate the timestamp precision to 1 second since git commit timestamps are persisted with 1 second precision [1]. [1] https://git-scm.com/docs/git-commit#Documentation/git-commit.txt-Gitinternalformat Change-Id: Id4ba1f108e1ba0bfcdd87ba37c67e2d3cc7d254f
-
Ivan Frade authored
Replacement of GitDateParser that uses java.time classes instead of the obsolete Date. Updating GitDateParser would have been a mess of deprecation and methods with confusing names, so I opted for writing a parallel class with the new types. Some differences: * The new DateTimeFormatter is thread-safe, so we don't need the LocalThread cache * No code seems to use other locale than the default, we don't need to cache per locale either Change-Id: If24610a055a47702fb5b7be2fc35a7c722480ee3
-
Matthias Sohn authored
Change-Id: I4f8cdaa3147c03b455ed0656622c6b69b474577a
-
Matthias Sohn authored
-
- Nov 18, 2024
-
-
Matthias Sohn authored
Change-Id: I8414114bb6c38b62d912e55810b4bf68faf3083f
-
- Nov 14, 2024
-
-
Matthias Sohn authored
Bug: jgit-107 Change-Id: I54856849df7c6959ccc2b6f10de510950d3da401
-
Matthias Sohn authored
Git uses a default similarity score of 50(%) for rename detection. Fix RenameDetector to use the same default score. See https://git-scm.com/docs/git-diff#Documentation/git-diff.txt--Mltngt Bug: jgit-110 Change-Id: I4b75910a02bca1afc108ad9e5609fda1e49a29da
-
Ivan Frade authored
Using #civilNow() because in the documentation, this calendar-based representation is called "civil time". Change-Id: Iaa363e66683cb548419666068a4ffef44a776e12
-
Ivan Frade authored
Abstract methods break subclasses (e.g. DelegateSystemReader in gerrit). Updating jgit and gerrit is simpler if we do not add them. I am not sure why some methods are abstract and others dont, but now() can be a concrete method. Make now() concrete. Implement it by default based on getCurrentTime(), so subclasses overriding that method get the same value. Change-Id: I697749f8cba698c5388ed13ebdc2b238d6259358
-
Ivan Frade authored
-
Ivan Frade authored
errorprone reports: [OperatorPrecedence] Use grouping parenthesis to make the operator precedence explicit Take the chance to fix also https://errorprone.info/bugpattern/YodaCondition in the same lines. Change-Id: I6d8f00842ef2bb24cd00fc413121b8a4e20c186b
-
Ivan Frade authored
Using this timezone in a later commit, it complains: Exception java.time.DateTimeException: Zone offset minutes and seconds must be negative because hours is negative Change-Id: I5787b51f98109942ac33e0496c5e3761914b2a78
-
- Nov 13, 2024
-
-
Ivan Frade authored
-
XenoAmess authored
Inline the function isBinary(byte, byte), and reduce several duplicated checks in it, for better performance. Change-Id: Ida855ed4fd7456d8fb7ed68f3af2dbfa0e25897c
-
Ivan Frade authored
This abstract method forces subclasses (e.g. DelegateSystemReader in gerrit) to update their code, but there is no strong reason to make it abstract (subclasses can override it if needed). Make the method concrete using the current default implementation (which is the same in the mock). Change-Id: Id1df0d71cab1d86879adf48e782f0050d3abcfa9
-
Ivan Frade authored
-