aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2022-07-066-11/+102
|\ | | | | | | | | | | | | | | | | | | * stable-6.0: UploadPack: don't prematurely terminate timer in case of error Do not create reflog for remote tracking branches during clone UploadPack: do not check reachability of visible SHA1s Add missing package import javax.management to org.eclipse.jgit Change-Id: I08734ee2c8f3296d908da6a29d53ed87c4b48eb2
| * Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-07-066-11/+102
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: UploadPack: don't prematurely terminate timer in case of error Do not create reflog for remote tracking branches during clone UploadPack: do not check reachability of visible SHA1s Add missing package import javax.management to org.eclipse.jgit Change-Id: I6db0a4d74399fde892eeec62efd2946f97547a5d
| | * UploadPack: don't prematurely terminate timer in case of errorMatthias Sohn2022-06-302-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In uploadWithExceptionPropagation don't prematurely terminate timer in case of error to enable reporting it to the client. Expose a close method so that callers can terminate it at the appropriate time. If the timer is already terminated when trying to report it to the client this failed with the error java.lang.IllegalStateException: "Timer already terminated". Bug: 579670 Change-Id: I95827442ccb0f9b1ede83630cf7c51cf619c399a
| | * Merge "Do not create reflog for remote tracking branches during clone" into ↵Matthias Sohn2022-06-263-2/+71
| | |\ | | | | | | | | | | | | stable-5.13
| | | * Do not create reflog for remote tracking branches during cloneLuca Milanesio2022-06-253-2/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using JGit on a non-bare repository, the CloneCommand it previously created local reflogs for all branches including remote tracking ones, causing the generation of a potentially large number of files on the local filesystem. The creation of the remote-tracking branches (refs/remotes/*) during clone is not an issue for the local filesystem because all of them are stored in a single packed-refs file. However, the creation of a large number of ref logs on a local filesystem IS an issue because it may not be tuned or initialised in term of inodes to contain a very large number of files. When a user (or a CI system) performs the CloneCommand against a potentially large repository (e.g., millions of branches), it is interested in working or validating a single branch or tag and is unlikely to work with all the remote-tracking branches. The eager creation of a reflogs for all the remote-tracking branches is not just a performance issue but may also compromise the ability to use JGit for cloning a large repository. The behaviour implemented in this change is also consistent with the optimisation done in the C code-base [1]. We differentiate between clone and fetch commands using --branch <initialBranch> option, that is only available in clone command, and is set as HEAD per default. [1] https://github.com/git/git/commit/58f233ce1ed67bbc31a429fde5c65d5050fdbd7d Bug: 579805 Change-Id: I58d0d36a8a4ce42e0f59b8bf063747c4b81bd859 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
| | * | UploadPack: do not check reachability of visible SHA1sLuca Milanesio2022-06-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When JGit needs to serve a Git client requesting SHA1s during the want phase, it needs to make a full reachability check from the advertised refs to the ones requested to keep all objects in the correct scope of confidentiality allowed by the avertised refs. The check is also performed when the SHA1 corresponds to one of the tips of the advertised refs which is a waste of resources. Example: fetch> ref-prefix refs/heads/foo fetch< 900505eb8ce8ced2a1757906da1b25c357b9654e refs/heads/foo fetch< 0000 fetch> command=fetch fetch> 0001 fetch> thin-pack fetch> ofs-delta fetch> want 900505eb8ce8ced2a1757906da1b25c357b9654e The SHA1 in the want is the tip of refs/heads/foo and therefore the full reachability check can be shortened and resolved more quickly. Change-Id: I49bd9e2464e0bd3bca2abf14c6e9df550d07383b Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
| | * | Add missing package import javax.management to org.eclipse.jgitMatthias Sohn2022-06-171-0/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | Class org.eclipse.jgit.util.Monitoring uses JMX hence we need this import otherwise OSGi applications can face ClassNotFoundException. Bug: 577018 Change-Id: Ifd75337b87c7faec95d333b771bb0a2f3e46a418
* | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2022-06-156-13/+438
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Prepare 5.13.2-SNAPSHOT builds JGit v5.13.1.202206130422-r AmazonS3: Add support for AWS API signature version 4 Change-Id: Ie9c38ab8033fe1283e8b444b6acd3f4298062bf3
| * | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-06-156-13/+438
| |\| | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Prepare 5.13.2-SNAPSHOT builds JGit v5.13.1.202206130422-r AmazonS3: Add support for AWS API signature version 4 Change-Id: Ibd663a1d874d1aac274abc3dd44354fd99f64c39
| | * Prepare 5.13.2-SNAPSHOT buildsMatthias Sohn2022-06-1488-503/+503
| | | | | | | | | | | | Change-Id: I4862e5d80a7d95a1a119d06306e3f6927445d1d3
| | * JGit v5.13.1.202206130422-rv5.13.1.202206130422-rMatthias Sohn2022-06-1388-121/+121
| | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Ife74d64e8171c68dbf08271492c0ac852a6dc51c
| | * AmazonS3: Add support for AWS API signature version 4eric.steele2022-06-136-14/+439
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating the AmazonS3 class to support AWS Signature version 4 because version 2 is no longer supported in all AWS regions. The version can be selected with the new 'aws.api.signature.version' property (defaults to 2 for backwards compatibility). When set to '4', the user must also specify the AWS region via the 'region' property. The 'region' property must match the region that the 'domain' property resolves to. Bug: 579907 Change-Id: If289dbc6d0f57323cfeaac2624c4eb5028f78d13
* | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2022-06-071-12/+24
|\| | | | | | | | | | | | | | | | | | | | * stable-6.0: Fix connection leak for smart http connections Change-Id: I8b7e643b87c0f788cdafb060a2c9e8b4ef6f7375
| * | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-06-071-12/+24
| |\| | | | | | | | | | | | | | | | | | | * stable-5.13: Fix connection leak for smart http connections Change-Id: Ic851f2c4660ed761f5527e405b116b54da42fb7c
| | * Merge branch 'stable-5.12' into stable-5.13Matthias Sohn2022-06-071-12/+24
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.12: Fix connection leak for smart http connections Change-Id: Id34f29c1b27a80c2b56c911cad7e3f64ef63af48
| | | * Merge branch 'stable-5.11' into stable-5.12Matthias Sohn2022-06-071-12/+24
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.11: Fix connection leak for smart http connections Change-Id: I6caabf4774ccf34706cef846c1087710f67e2ecd
| | | | * Merge branch 'stable-5.10' into stable-5.11Matthias Sohn2022-06-071-12/+24
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.10: Fix connection leak for smart http connections Change-Id: I3885c6114caed897f762f5ce523d3b27288205b2
| | | | | * Merge branch 'stable-5.9' into stable-5.10Matthias Sohn2022-06-071-11/+23
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.9: Fix connection leak for smart http connections Change-Id: I5e7144b2f5cd850978220c476947001ae2debb8e
| | | | | | * Fix connection leak for smart http connectionsSaša Živkov2022-06-061-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SmartHttpPushConnection: close InputStream and OutputStream after processing. Wrap IOExceptions which aren't TransportExceptions already as a TransportException. Also-By: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I8e11d899672fc470c390a455dc86367e92ef9076
* | | | | | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2022-05-273-9/+39
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Remove stray files (probes or lock files) created by background threads Change-Id: Iab21b9776c2ebecd4cad5d015028cadd4b6541db
| * | | | | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-05-273-9/+39
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Remove stray files (probes or lock files) created by background threads Change-Id: I7af1355a77f14995118145162f6bb8a4f1755f2b
| | * | | | | Remove stray files (probes or lock files) created by background threadsJames Z.M. Gao2022-05-273-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: port back from master branch. On process exit, it was possible that the filesystem timestamp resolution measurement left behind .probe files or even a lock file for the jgit.config. Ensure the SAVE_RUNNER is shut down when the process exits (via System.exit() or otherwise). Move lf.lock() into the try-finally block when saving the config file. Delete .probe files on JVM shutdown -- they are created in daemon threads that may terminate abruptly, not executing the "finally" clause that normally removes these files. Bug: 579445 Change-Id: Iaee2301eb14e6201406398a90228ad10cfea6098
* | | | | | | HTTP Smart: set correct HTTP status on errorSven Selberg2022-05-094-23/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous behavior was that status code was automatically set to 200 regardless of reported status and according to HTTP Smart protocol[1]: If there is no repository at $GIT_URL, or the resource pointed to by a location matching $GIT_URL does not exist, the server MUST NOT respond with 200 OK response. A server SHOULD respond with 404 Not Found, 410 Gone, or any other suitable HTTP status code which does not imply the resource exists as requested. Since the jgit HTTP client isn't able to handle reading content from a response reporting an error (calling HttpURLConnection#getInputStream on a "failed" connection throws an exception and the internal interface HttpConnection does not expose HttpURLConnection#getErrorStream) the SmartClientSmartServerTest needed to be rewritten to expect the generic response messages. [1] https://git-scm.com/docs/http-protocol#_general_request_processing Bug: 579676 Change-Id: Ibb942d02124a0bc279df09600b091354019ce064
* | | | | | | Prepare 6.1.1-SNAPSHOT buildsMatthias Sohn2022-03-0891-527/+527
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifc80355025d8459245843be1c24dc5a286913e77
* | | | | | | JGit v6.1.0.202203080745-rv6.1.0.202203080745-rMatthias Sohn2022-03-0891-125/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8766ed400020c9571f321bbbfe34b0688af0107d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | [checkout] Use .gitattributes from the commit to be checked outThomas Wolf2022-03-077-145/+489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | Don't use final for method parametersMatthias Sohn2022-03-063-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://wiki.eclipse.org/EGit/Contributor_Guide#Use_of_the_.22final.22_modifier Change-Id: Idc6ed85483e381689e5085c4a1bacd75d26f5489
* | | | | | | [push] support the "matching" RefSpecs ":" and "+:"Thomas Wolf2022-03-067-74/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of push.default=matching was not correct. It used the RefSpec "refs/heads/*:refs/heads/*", which would push _all_ local branches. But "matching" must push only those local branches for which a remote branch with the same name already exists at the remote. This RefSpec can be expanded only once the advertisement from the remote has been received. Enhance RefSpec so that ":" and "+:" can be represented. Introduce a special RemoteRefUpdate for such a RefSpec; it must carry through the fetch RefSpecs to be able to fill in the remote tracking updates as needed. Implement the expansion in PushProcess. Bug: 353405 Change-Id: I54a4bfbb0a6a7d77b9128bf4a9c951d6586c3df4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | [push] Call the pre-push hook later in the push processThomas Wolf2022-03-063-22/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call the pre-push hook only after having received the remote advertisement and having determined rejections, like C git does. Also similar to C git, don't pass rejected or up-to-date updates to the pre-push hook. Bug: 578852 Change-Id: I51d379ea7bd8234ec815f8f4a9fa325816f476cf Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | IndexDiff: use tree filter also for SubmoduleWalkThomas Wolf2022-03-062-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only uses of IndexDiff.setFilter() in JGit and EGit set a path filter. Passing the filter on to the SubmoduleWalk gives the desired result, which is consistent with command-line git. Bug: 565251 Change-Id: I8eca1ed73eb1d237b8785f369352f72af9e0e168 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | | | Run license check with option -Ddash.projectId=technology.jgitMatthias Sohn2022-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that works-with-dependencies are attributed properly. Change-Id: Ie41733cdecc83ae0b532fb4bd9f692bc09e16107
* | | | | | | Exclude transitive dependencies of sshd-sftpMatthias Sohn2022-03-042-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need the dependencies of sshd-sftp to sshd-common and sshd-core since they are contained in sshd-osgi. Excluding them helps the dash IP log tool to not list them as required dependencies of jgit. Change-Id: I85bce4dca1b99ba880cf3e909fac9669c75e7854
* | | | | | | Update DEPENDENCIES for 6.1.0 releaseMatthias Sohn2022-03-031-53/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9ea925bd444952dc204e2538b9d16fe631202e0c
* | | | | | | Add dependency to dash-licensesMatthias Sohn2022-03-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required to run the license check using the license tool [1] required by the Eclipse project handbook [2]: mvn org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES Note: the tool still requires Java 11 hence it needs to be run in a separate build step and is not yet integrated in the build which runs on Java 8. [1] https://github.com/eclipse/dash-licenses [2] https://www.eclipse.org/projects/handbook/#ip-license-tool Change-Id: Ib41d54de246c3c9499cc3be9f026294c39fdfd99
* | | | | | | Fix typos of some keys in LfsTextMatthias Sohn2022-03-034-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I86dee0b68e627e26cbd29976162bc7b953ebf276
* | | | | | | Sort LfsText entries alphabeticallyMatthias Sohn2022-03-032-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3021cb246b51d861d51258808c75d5c6843ec82d
* | | | | | | Support for "lfs.url" from ".lfsconfig"Matthias Fromme2022-03-039-31/+737
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New class LfsConfig to enrich repository configuration by settings from ".lfsconfig" file respecting configuration file precedence. - Adapted LfsConnectionFactory to use LfsConfig instead of directly using configuration from repository to calculate url of the lfs repository Bug: 578020 Change-Id: I156f4ec137c2e428136a2ca9b8a4011ecee2d915
* | | | | | | Update Orbit to R20220302172233 for 2022-03Matthias Sohn2022-03-0213-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ief504bf7f926d461e38186bf00711082d619fc08
* | | | | | | Prepare 6.1.0-SNAPSHOT buildsMatthias Sohn2022-03-0291-125/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I525fc1258a729c36d63fdb3c8170e9f04ad55cec
* | | | | | | JGit v6.1.0.202203021511-rc1v6.1.0.202203021511-rc1Matthias Sohn2022-03-0291-125/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4c75a58fd76102e773af4f1f8a1487d5e7ffc7cf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Merge branch 'master' into stable-6.1Matthias Sohn2022-03-0222-19/+620
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Describe: add support for core.abbrev config option Add a typed config getter for integers confined to a range Remove odd prefix of PersonIdent test class PersonIdent: Add ctors that accept Instant in addition to Date Remove ignored potentiallyUnclosedCloseable check Make precedence more explicit [pgm] Add describe --abbrev option Cap describe abbrev option DescribeCommand: Add support for --abbrev=0 Change-Id: I1daa3501a38d57b628800fadb96b6b71eea8cbb3
| * | | | | | | Describe: add support for core.abbrev config optionMatthias Sohn2022-03-0212-12/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-025-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Integer#MIN_VALUE to denote unset option. Change-Id: I4d65f2434013111f25520c0ed2b9a9dc8123c6cf
| * | | | | | | Remove odd prefix of PersonIdent test classMatthias Sohn2022-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I05ede49902527c435691fb2c0f0d4da7ba077b7a
| * | | | | | | PersonIdent: Add ctors that accept Instant in addition to DateDavid Ostrovsky2022-03-022-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error Prone is flagging Date-API as obsolete and recommends to migrate to Instant and LocalDate. Given that more JGit users starting to migrate to new Time API, offer ctors that accept Instant type and also add new getter that returns when attribute as Instant type. Change-Id: I64a36bf40f191495c6889c1dff314ede06848880
| * | | | | | | Remove ignored potentiallyUnclosedCloseable checkFabio Ponciroli2022-03-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | potentiallyUnclosedCloseable currently is not checked and it creates a warning when compiling with Maven. Change-Id: I0715ead433270937f77f56a19aa203f8d6f5322f
| * | | | | | | Make precedence more explicitFabio Ponciroli2022-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone was failing the build with: "[OperatorPrecedence]. Use grouping parenthesis to make the operator precedence explicit" Add parentheses to silence it. Change-Id: I81f1f249e38fd2543f5412b3501b0179d0759f55
| * | | | | | | [pgm] Add describe --abbrev optionMatthias Sohn2022-03-023-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8adf2fad21db71b43266d3f274143eee6bc9dce2
| * | | | | | | Cap describe abbrev optionMatthias Sohn2022-03-022-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - minimum is 4 [1] - maximum is length of a full ObjectId [1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreabbrev Change-Id: I145bde1a218f71b87b8d8260761dd0853770bb76
| * | | | | | | DescribeCommand: Add support for --abbrev=0Matthias Sohn2022-03-022-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting --abbrev=0 suppresses long format and only shows the closest tag [1]. [1] https://git-scm.com/docs/git-describe#Documentation/git-describe.txt---abbrevltngt Change-Id: Ifcf4d7786dd0f0fb0315d8093fdb54384ed9d5f9