summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.archive
Commit message (Collapse)AuthorAgeFilesLines
* JGit v4.9.0.201710071750-rv4.9.0.201710071750-rMatthias Sohn2017-10-073-4/+4
| | | | | Change-Id: I487f6aa3d0c4ef1d57f91cdc36177d994ae24c51 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Partially revert c0ad77d8 "Enhance Eclipse save actions"Matthias Sohn2017-08-301-1/+1
| | | | | | | | Do not automatically organize imports using a save action since this seems to be buggy and removed some annotations org.eclipse.jgit.pgm needs to use args4j. Change-Id: I5a91292c3b9241ce2dde3e4ecce14ad460097129 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Partially revert c0ad77d8 "Enhance Eclipse save actions"Matthias Sohn2017-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | Revert the following save actions which were introduced in c0ad77d8: - always use braces around blocks - remove unused imports Other than I expected save actions are run globally on edited files - and not only on edited code lines only. Hence revert the save action "Convert control statement bodies to blocks" which would affect a large number of code lines not affected by the change editing some small part of a class. This would generate a large number of changes which may lead to many unnecessary conflicts. Total number of affected lines across jgit would be around 10k lines. Also revert "Remove unused imports" since it erroneously removes imports of some annotations needed by pgm classes using args4j. Change-Id: I879a47f68e664129e6124cf25c1ae1f6a2d7a5aa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Enhance Eclipse save actionsMatthias Sohn2017-08-281-7/+12
| | | | | | | | | | | | | | | | | | | | | Add the following Eclipse save actions executed when saving modified lines. This should help to reduce manual work needed to maintain a clean and consistent code style: - organize imports - always use braces around blocks - add missing annotations - @Override including implementation of interface methods - @Deprecated - remove - unused imports - unnecessary $NON-NLS$ tags - redundant type arguments Also add default values for new settings that were introduced in recent Eclipse versions up to Neon since we updated save rules the last time. Change-Id: Idc90b249df044d0552f04edf01a5f607c4846f50 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.9.0-SNAPSHOT buildsMatthias Sohn2017-05-303-10/+10
| | | | | Change-Id: I52a4153d573799e861ab104939f51fac1aceb9ee Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Bazel: Restrict src globs to Java source filesDavid Pursehouse2017-04-131-1/+1
| | | | | | | | | | | | | | | | Generating the src list with an unrestricted wildcard causes all files in the source tree to be included. This results in junk files such as .orig (generated during merge conflict resolution) to be included, which causes in a build error: in srcs attribute of java_library rule //org.eclipse.jgit:jgit: file '//org.eclipse.jgit:src/org/eclipse/jgit/gitrepo/RepoCommand.java.orig' is misplaced here (expected .java, .srcjar or .properties). Modify the globs to only include Java source files. Change-Id: Iaef3db33ac71d71047cd28acb0378e15cb09ece9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.8.0-SNAPSHOT buildsMatthias Sohn2017-04-053-10/+10
| | | | | Change-Id: Ifea6750e79d417a8a2a891b3b5f96d68c7200011 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* TarFormat: Use commit time as timestamp for entriesYasuhiro Takagi2017-04-051-0/+8
| | | | | | | | This was already done for ZipFormat in 1448ec3. Change-Id: Ie131938a3f640c68718dc793d18dd35be5c71e7c Signed-off-by: Yasuhiro Takagi <ytakagi@bea.hi-ho.ne.jp> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Remove Buck buildDavid Pursehouse2017-03-221-13/+0
| | | | | | Buck will be replaced with Bazel Change-Id: I3cf07d7aaaa2a58bac34e16c50af5416693254ac Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* bazel: Add explicit targets for library dependenciesJonathan Nieder2017-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | This provides a place to declare visibility restrictions and transitive dependencies for each library. Other targets should only declare dependencies on what they directly use, making dependencies easier to maintain. Trim the dependencies of org.eclipse.jgit:jgit to follow that rule. It declares dependencies on Apache httpcomponents and the servlet API but doesn't use them. Tested: * 'bazel build //...' succeeds * applying the change https://gerrit-review.googlesource.com/90843 to a copy of Gerrit, following the instructions there, and running 'bazel test //...' in that copy of Gerrit still succeeds Change-Id: I3ab958ce8b3227019cdbe4cc81e0f042e1541034
* Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-202-2/+2
| | | | | | | | | | Since the introduction of generic type parameter inference in Java 7, it's not necessary to explicitly specify the type of generic parameters. Enable the warning in Eclipse, and fix all occurrences. Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Fix timestamp in Zip archivesShawn Pearce2017-02-201-3/+3
| | | | | | | | | | RevCommit.getCommitTime returns time in seconds since the epoch. ZipArchiveEntry.setTime expects time in milliseconds. Add the missing unit conversion to get the correct result. Correct formatting to be consistent with the rest of the code. Change-Id: I990b92f1d996ec8538d4857755694d91b142eb53
* Enable and fix 'Should be tagged with @Override' warningDavid Pursehouse2017-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Add missing @Override annotations in org.eclipse.jgit.archiveMatthias Sohn2017-02-186-0/+17
| | | | Change-Id: I51e37ca7643da6abadbd36e9187ccb58fe713833 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Set commit time to ZipArchiveEntryNaoki Takezoe2017-02-186-3/+76
| | | | | | | | | | | | | | | | Archived zip files for a same commit have different MD5 hash because mdate and mdate in the header of zip entries are not specified. In this case, Commons Compress sets an archived time. In the original git implementation, it's set a commit time: https://github.com/git/git/blob/e2b2d6a172b76d44cb7b1ddb12ea5bfac9613a44/archive.c#L378 By this fix, archive command sets the commit time to ZipArchiveEntry when RevCommit is given as an archiving target. Change-Id: I30dd8710e910cdf42d57742f8709e9803930a123 Signed-off-by: Naoki Takezoe <takezoe@gmail.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Format Bazel files with buildifierDavid Pursehouse2017-01-221-12/+13
| | | | | Change-Id: I934114315d2c7cab917f1011b8e55c52367d429f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Implement initial framework of Bazel buildDavid Ostrovsky2017-01-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial implementation only builds the packages consumed by Gerrit Code Review. Test build and execution is not implemented. We prefer to consume maven_jar custom rule from bazlets repository, for the same reasons as in the Gerrit project: * Caching artifacts across different clones and projects * Exposing source classifiers and neverlink artifact TEST PLAN: $ bazel build :all $ unzip -t bazel-genfiles/all.zip Archive: bazel-genfiles/all.zip testing: libjgit-archive.jar OK testing: libjgit-servlet.jar OK testing: libjgit.jar OK testing: libjunit.jar OK No errors detected in compressed data of bazel-genfiles/all.zip. Change-Id: Ia837ce95d9829fe2515f37b7a04a71a4598672a0 Signed-off-by: David Ostrovsky <david@ostrovsky.org> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.7.0-SNAPSHOT buildsMatthias Sohn2016-12-273-9/+9
| | | | | Change-Id: I20754d13007e6591d36aae5766f3a9a82b24e120 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.6.1-SNAPSHOT buildsMatthias Sohn2016-12-243-9/+9
| | | | | Change-Id: I6b05a6f6c3f92365c272e1bdaf76093ca01f2d58 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.6.0.201612231935-rv4.6.0.201612231935-rMatthias Sohn2016-12-243-4/+4
| | | | | Change-Id: Iaa88fe1b195dfe6be99a7b4cb064684e75563715 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Change JGit minimum execution environment to JavaSE-1.8Matthias Sohn2016-09-203-5/+5
| | | | | Bug: 500059 Change-Id: I47f3f6749a67da52029f84e002d9b155ed56d2b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.6.0-SNAPSHOT buildsMatthias Sohn2016-09-193-9/+9
| | | | | Change-Id: Id2eafc331ee32c332c2a9b867b05c260beb0d10f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Archive: Make project name consistent with other subprojects'David Pursehouse2016-07-261-1/+1
| | | | | Change-Id: I8341f3340d8129b4f966d541097269210fbf65d2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Ignore 'The value of exception parameter is not used' warningDavid Pursehouse2016-07-261-0/+1
| | | | | Change-Id: I50407e4a33e35b718ca40503fdd436f1f9f70fba Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.5.0-SNAPSHOT buildsMatthias Sohn2016-06-013-9/+9
| | | | | Change-Id: I572fe9fea0e5ca0bec4648c916ae95a5b1ccf125 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.4.0-SNAPSHOT buildsMatthias Sohn2016-04-083-9/+9
| | | | | Change-Id: If3162f4cc4ae6319b9f1e3293549485b039cfe7f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.3.1-SNAPSHOT versionsMatthias Sohn2016-04-083-9/+9
| | | | | Change-Id: I52c98ba8fb3a303269a1f9380af114b6dd8c5009 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201604071810-rv4.3.0.201604071810-rMatthias Sohn2016-04-083-4/+4
| | | | | Change-Id: I902cdf1ff92ce8c6e9d80c4965d8d5bd8b9ac6c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201604071045-rMatthias Sohn2016-04-073-4/+4
| | | | | Change-Id: Iafab78d6be34d31a13f979b7be67611135c0f8bd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.3-SNAPSHOT buildsMatthias Sohn2016-04-053-4/+4
| | | | | Change-Id: Ib831f8870938113bd5338763f90a07d5c108b1de Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.3.0.201603230630-rc1v4.3.0.201603230630-rc1Matthias Sohn2016-03-233-4/+4
| | | | | Change-Id: I10835e5aa3618e5033424595942cc1649152cb24 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.3.0-SNAPSHOT buildsMatthias Sohn2016-01-213-9/+9
| | | | | Change-Id: Idcf0479529693b023042becd96698f9afd344bd4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Implement Buck driven buildDavid Ostrovsky2015-12-311-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today there are plenty of modern build tool systems available in the wild (in no particular order): * http://bazel.io * https://pantsbuild.github.io * http://shakebuild.com * https://ninja-build.org * https://buckbuild.com The attributes, that all these build tools have in common, are: * reliable * correct * very fast * reproducible It must not always be the other build tool, this project is currently using. Or, quoting Gerrit Code Review maintainer here: "Friends, don't let friends use <the other build tool system>!" This change is non-complete implementation of JGit build in Buck, needed by Gerrit Code Review to replace its dependency with standlone JGit cell. This is very useful when a developer is working on both projects and is trying to integrate changes made in JGit in Gerrit. The supported workflow is: $ cd jgit $ emacs <hack> $ cd ../gerrit $ buck build --config repositories.jgit=../jgit gerrit With --config repositories.jgit=../jgit jgit cell is routed through JGit development tree. To build jgit, issue: $ buck build //:jgit [-] PROCESSING BUCK FILES...FINISHED 0,0s Yes, you can't measure no-op build time, given that Buck daemon is used. Change-Id: I301a71b19fba35a5093d8cc64d4ba970c2877a44 Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* Update dependencies to use the JGit-internal @NullableTerry Parker2015-11-092-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the project-specific Eclipse settings to replace the use of the org.eclipse.jdt.annotation.Nullable class the new JGit-specific @Nullable annotation. I verified that Eclipse reports errors when the return value of a method annotated with @org.eclipse.jgit.annotations.Nullable is dereferenced without a null check. Also remove the Maven and MANIFEST.MF dependencies on org.eclipse.jdt.annotation. Eclipse null analysis uses three annotations: @Nullable, @NonNull and @NonNullByDefault. All three are updated in this patch because it is invalid to set the Eclipse preferences to empty values. So far only @Nullable has been introduced in org.eclipse.jgit.annotations. My personal preference is to follow the advice in Effective Java and avoid the null-return idiom, and to avoid passing null values in general. This sets the expectation is that arguments and return types are assumed non-null unless otherwise documented. If that is the expectation, then consistent application of @NonNull is redundant and hurts readability by cluttering the code, obscuring the occasional @Nullable annotation that really requires attention. If the JGit community decides there is value in using the @NonNull and @NonNullByDefault annotations we can add them--this change configures Eclipse to use them. Change-Id: I9af1b786d1b44b9b0d9c609480dc842df79bf698 Signed-off-by: Terry Parker <tparker@google.com>
* Use japicmp instead of clirr to detect API changesMatthias Sohn2015-10-011-0/+87
| | | | | | | Clirr doesn't support Java 8 hence use japicmp instead. See https://github.com/siom79/japicmp Change-Id: If4b30a6d6aa849b4d6b3b0c900558c609822840c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.2.0-SNAPSHOT buildsMatthias Sohn2015-09-283-9/+9
| | | | | Change-Id: If559d3565b1f84c93a533e1ce18d5293605d1950 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.1.1-SNAPSHOT buildsMatthias Sohn2015-09-283-9/+9
| | | | | Change-Id: I035f3a8d0f0de86e8b8f00e668be5ce008402e82 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.1.0.201509280440-rv4.1.0.201509280440-rMatthias Sohn2015-09-283-4/+4
| | | | | Change-Id: I9a536870b9f5c1247c52d6c976a954115982fa1c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Enable annotation based NPE analysis in jgitAndrey Loskutov2015-08-202-4/+5
| | | | | | Bug: 470647 Change-Id: I14d1983bb7c208faeffee0504e0567e38d8a89f3 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Prepare 4.1.0-SNAPSHOT buildsMatthias Sohn2015-06-033-9/+9
| | | | | Change-Id: I03d08b8e2d3400d4b5cdb4ab541b312870776843 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix string externalization warnings in BaseFormatMatthias Sohn2015-03-123-4/+8
| | | | Change-Id: Ie40aa1f889191e45e4d4a7a144c3176d521f6cfa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add missing @since tags for new API methods in archive bundleMatthias Sohn2015-03-126-0/+17
| | | | Change-Id: I891e2cf9ca89ae1948e9713a412d31ec66faac86 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix compile error due to missing dependencies and since tagsMarkus Duft2015-03-121-0/+1
| | | | Change-Id: I98a9f17f987c4f3ea19d107f681c44754ed83dca Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* ArchiveCommand: Allow to pass options to underlying streamDavid Ostrovsky2015-02-206-13/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current ArchiveCommand design doesn't allow to pass in options to underlying stream implementations. To overcome this, client has to implement custom format implementation (it cannot be derived from the existing one, because the classes are marked as final), and set the options using ThreadLocal, before the method ArchiveOutputStream createArchiveOutputStream(OutputStream s) is get called. This change extends the ArchiveCommand.Format by allowing to pass option map during creation of ArchiveOutputStream. ArchiveCommand is extended correspondingly. That way client can easily pass options to the underlying streams: Map<String, Object> level = ImmutableMap.<String, Object> of( "level", new Integer(9)); new ArchiveCommand(repo) .setFormat("zip") .setFormatOptions(level) .setTree(tree) .setPaths(paths) .setPrefix(prefix) .setOutputStream(sidebandOut) .call(); Change-Id: I1d92a1e5249117487da39d19c7593e4b812ad97a Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* Set minimum required Java version to Java 7Matthias Sohn2015-02-093-5/+5
| | | | | | Bug: 458475 Change-Id: Iea8f2236d4e6a94a8d14bb8cc685006ea3fd1bb7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.0.0-SNAPSHOT buildsMatthias Sohn2015-01-273-8/+8
| | | | | Change-Id: I414ba8ccc82866d3107ba7083a567ea70c879bdf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.7.0-SNAPSHOT buildsMatthias Sohn2014-12-243-8/+8
| | | | | Change-Id: Ib3e7b5f46ee1e27b9cf25b3b2d01d681a5c4904c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 3.6.1-SNAPSHOT buildsMatthias Sohn2014-12-233-8/+8
| | | | | Change-Id: Ie620c90ffafbffc6755b4e1ed55a61a15b118a2a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.6.0.201412230720-rv3.6.0.201412230720-rMatthias Sohn2014-12-233-4/+4
| | | | | Change-Id: Ic28e2bbbdb1099e948c64a005c39f6b8d8ac69a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post 3.6.0-m1 buildsMatthias Sohn2014-11-123-4/+4
| | | | | Change-Id: Ie9927de64fa6b7d517f96b8cd12e57541f284ff2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>