aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/.settings
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused API filtersDavid Pursehouse2017-12-131-43/+0
| | | | | Change-Id: Ie8bfa4e8473c2a68a6308de7dbf29ccbca97495d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Merge branch 'stable-4.9'Matthias Sohn2017-11-242-53/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ignore warning for minor version change without API change Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Icc33d2e36f140e8714fce088379673a8834ae9de
| * Ignore warning for minor version change without API changeMatthias Sohn2017-11-241-1/+11
| | | | | | | | | | | | | | | | - this is a new warning option in Eclipse 4.7 and higher - we always change version of all bundles in a release to keep release engineering simple Change-Id: Ic7523d77b67b2802f1bab3bc70af250d712a034f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'stable-4.8' into stable-4.9Matthias Sohn2017-11-241-25/+40
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.8: Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: I7cf2e48934195430b3945b6d74b092f93a3ccd36 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2017-11-221-9/+24
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Iaa99ec84594baf733c993c2d6768281ff14f545a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | * Merge branch 'stable-4.6' into stable-4.7Matthias Sohn2017-11-221-30/+22
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: I8f6bc09540727c6273d22775a9f9ca382a729c9b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | * Merge branch 'stable-4.5' into stable-4.6Matthias Sohn2017-11-221-3/+61
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Ie9c8e0d9172c8d53f075c284bf2a9677980d8dfb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | | | | * Fix LockFile semantics when running on NFSChristian Halstrick2017-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running on NFS there was a chance that JGits LockFile semantic is broken because File#createNewFile() may allow multiple clients to create the same file in parallel. This change provides a fix which is only used when the new config option core.supportsAtomicCreateNewFile is set to false. The default for this option is true. This option can only be set in the global or the system config file. The repository config file is not taken into account in this case. If the config option core.supportsAtomicCreateNewFile is true then File#createNewFile() is trusted and the behaviour doesn't change. But if core.supportsAtomicCreateNewFile is set to false then after successful creation of the lock file a hardlink to that lock file is created and the attribute nlink of the lock file is checked to be 2. If multiple clients manage to create the same lock file nlink would be greater than 2 showing the error. This expensive workaround is described in https://www.time-travellers.org/shane/papers/NFS_considered_harmful.html section III.d) "Exclusive File Creation" Change-Id: I3d2cc48d8eb280d5f7039eb94da37804f903be6a
* | | | | | Silence invalid @since 3.5 API warning on ResolveMerge#processEntryMatthias Sohn2017-11-131-0/+7
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method was removed in 4.9 and reintroduced in I48ba4308dee73925fa32d6c2fd6b5fd89632c571 as deprecated in 4.9.1 in order to help EMF Compare to avoid breakage. Change-Id: Ia638517178313da42ae13ebcf88ad535d9a02723 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | Reintroduce protected method which removal broke EMF CompareMatthias Sohn2017-10-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we follow OSGi semantic versioning [1] which says the following: "A change in the second (minor) part of the version signals that the change is backward compatible with consumers of the API package but not with the providers of that API. That is, when the API package goes from version 1.5 to 1.6 it is no longer compatible with a provider of that API but consumers of that API are backward compatible with that API package." The change Ib5fbf17bdaf727bc5d0e106ce88f2620d9f87a6f broke EMF Compare which subclasses ResolveMerger since we added a new parameter to the protected ResolveMerger.processEntry() method. According to the above cited OSGi semantic versioning this is ok, implementers should expect that they break on minor version changes of the API they implement. This change reintroduces the old processEntry() method in order to help avoid breakage for existing EMF Compare versions which expect breakage also for the implementer case only for major version change (in this case from JGit 4.x to 5.x). [1] http://www.osgi.org/wp-content/uploads/SemanticVersioning1.pdf See: https://dev.eclipse.org/mhonarc/lists/jgit-dev/msg03431.html Change-Id: I48ba4308dee73925fa32d6c2fd6b5fd89632c571 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | Remove no longer needed API problem filtersMatthias Sohn2017-09-061-28/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I206682a60ad9228c89efa22f8db9e72e19f17f6d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | Silence API errors caused by adding enum constants in 1baf86d4d2David Pursehouse2017-08-311-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I23338c04567f95aedd909ab310e01277e8f7db69 Signed-off-by: David Pursehouse <david.pursehouse@gmail.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>
* | | | | Add support to follow HTTP redirectsThomas Wolf2017-08-171-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-core follows HTTP redirects so JGit should also provide this. Implement config setting http.followRedirects with possible values "false" (= never), "true" (= always), and "initial" (only on GET, but not on POST).[1] We must do our own redirect handling and cannot rely on the support that the underlying real connection may offer. At least the JDK's HttpURLConnection has two features that get in the way: * it does not allow cross-protocol redirects and thus fails on http->https redirects (for instance, on Github). * it translates a redirect after a POST to a GET unless the system property "http.strictPostRedirect" is set to true. We don't want to manipulate that system setting nor require it. Additionally, git has its own rules about what redirects it accepts;[2] for instance, it does not allow a redirect that adds query arguments. We handle response codes 301, 302, 303, and 307 as per RFC 2616.[3] On POST we do not handle 303, and we follow redirects only if http.followRedirects == true. Redirects are followed only a certain number of times. There are two ways to control that limit: * by default, the limit is given by the http.maxRedirects system property that is also used by the JDK. If the system property is not set, the default is 5. (This is much lower than the JDK default of 20, but I don't see the value of following so many redirects.) * this can be overwritten by a http.maxRedirects git config setting. The JGit http.* git config settings are currently all global; JGit has no support yet for URI-specific settings "http.<pattern>.name". Adding support for that is well beyond the scope of this change. Like git-core, we log every redirect attempt (LOG.info) so that users may know about the redirection having occurred. Extends the test framework to configure an AppServer with HTTPS support so that we can test cloning via HTTPS and redirections involving HTTPS. [1] https://git-scm.com/docs/git-config [2] https://kernel.googlesource.com/pub/scm/git/git/+/6628eb41db5189c0cdfdced6d8697e7c813c5f0f [3] https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html CQ: 13987 Bug: 465167 Change-Id: I86518cb76842f7d326b51f8715e3bbf8ada89859 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | Silence API errors caused by adding enum constants in dbb137eMatthias Sohn2017-08-011-0/+20
| | | | | | | | | | | | | | | | | | | | Change-Id: I46a29eae7b617f3f43f270c40072a1c103ef77f2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | Support -merge attribute in binary macroMathieu Cartaud2017-06-271-0/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merger is now able to react to the use of the merge attribute. The value unset and the custom value 'binary' are handled (-merge and merge=binary) Since the specification of the merge attribute states that when the attribute is unset, ours version must be kept in case of a conflict, we don't overwrite the file but keep the local version. Bug: 517128 Change-Id: Ib5fbf17bdaf727bc5d0e106ce88f2620d9f87a6f Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
* | | | Merge branch 'stable-4.7' into stable-4.8Matthias Sohn2017-06-071-0/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.7: Run auto GC in the background Change-Id: I5e25765f65d833f13cbe99696ef33055d7f5c4cf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Run auto GC in the backgroundDavid Turner2017-06-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running an automatic GC on a FileRepository, when the caller passes a NullProgressMonitor, run the GC in a background thread. Use a thread pool of size 1 to limit the number of background threads spawned for background gc in the same application. In the next minor release we can make the thread pool configurable. In some cases, the auto GC limit is lower than the true number of unreachable loose objects, so auto GC will run after every (e.g) fetch operation. This leads to the appearance of poor fetch performance. Since these GCs will never make progress (until either the objects become referenced, or the two week timeout expires), blocking on them simply reduces throughput. In the event that an auto GC would make progress, it's still OK if it runs in the background. The progress will still happen. This matches the behavior of regular git. Git (and now jgit) uses the lock file for gc.log to prevent simultaneous runs of background gc. Further, it writes errors to gc.log, and won't run background gc if that file is present and recent. If gc.log is too old (according to the config gc.logexpiry), it will be ignored. Change-Id: I3870cadb4a0a6763feff252e6eaef99f4aa8d0df Signed-off-by: David Turner <dturner@twosigma.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Remove unused API filtersMatthias Sohn2017-04-091-51/+0
| | | | | | | | | | | | | | | | Change-Id: I1e00d71395228265aad4071b023024ee1bf855d5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Silence API error for new method added to abstract MergeStrategyMatthias Sohn2017-04-061-0/+8
|/ / / | | | | | | | | | | | | | | | | | | OSGi semantic versioning rules allow to break implementors of an API in a minor version. Change-Id: I4ada3e6455e8e8e1bb8fb71affa0a1b36bd46fc4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-4.6'Matthias Sohn2017-03-271-0/+27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.6: Only mark packfile invalid if exception signals permanent problem Don't flag a packfile invalid if opening existing file failed Prepare 4.5.2-SNAPSHOT builds Change-Id: Ife4efad1135d3870a5a0fb71e60b9524fb8777ab Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge branch 'stable-4.5' into stable-4.6David Pursehouse2017-03-271-0/+11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.5: Only mark packfile invalid if exception signals permanent problem Don't flag a packfile invalid if opening existing file failed Prepare 4.5.2-SNAPSHOT builds Change-Id: I20b50981adc54c426666015ff04fe3bb1db9abd9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| | * Only mark packfile invalid if exception signals permanent problemMatthias Sohn2017-03-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add NoPackSignatureException and UnsupportedPackVersionException to explicitly mark permanent unrecoverable problems with a pack Assume problem with a pack is permanent only if we are sure the exception signals a non-transient problem we can't recover from: - AccessDeniedException: we lack permissions - CorruptObjectException: we detected corruption - EOFException: file ended unexpectedly - NoPackSignatureException: pack has no pack signature - NoSuchFileException: file has gone missing - PackMismatchException: pack no longer matches its index - UnpackException: unpacking failed - UnsupportedPackIndexVersionException: unsupported pack index version - UnsupportedPackVersionException: unsupported pack version Do not attempt to handle Errors since they are thrown for serious problems applications should not try to recover from. Change-Id: I2c416ce2b0e23255c4fb03a3f9a0ee237f7a484a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Silence API error caused by changed return type of digest()Matthias Sohn2017-03-011-0/+8
| | | | | | | | | | | | Change-Id: Ic0810ed7fea837c45cbc9a4649ca51d140bad6e6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | 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>
* | | Set commit time to ZipArchiveEntryNaoki Takezoe2017-02-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Follow redirects in transportBo Zhang2017-02-021-0/+11
|/ / | | | | | | | | | | Bug: 465167 Change-Id: I6da19c8106201c2a1ac69002bd633b7387f25d96 Signed-off-by: Bo Zhang <zhangbodut@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* / Change JGit minimum execution environment to JavaSE-1.8Matthias Sohn2016-09-201-3/+3
|/ | | | | Bug: 500059 Change-Id: I47f3f6749a67da52029f84e002d9b155ed56d2b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.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>
* Remove no longer needed API problem filtersMatthias Sohn2016-07-041-40/+0
| | | | Change-Id: I2332ce2f29e105b60b62a9a6fc7d4656a0c89343 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add EOL stream type detection to TreeWalkIvan Motsch2016-03-071-0/+21
| | | | | | | | | | | | | | TreeWalk provides the new method getEolStreamType. This new method can be used with EolStreamTypeUtil in order to create a wrapped InputStream or OutputStream when reading / writing files. The implementation implements support for the git configuration options core.crlf, core.eol and the .gitattributes "text", "eol" and "binary" CQ: 10896 Bug: 486563 Change-Id: Ie4f6367afc2a6aec1de56faf95120fff0339a358 Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add Attribute Macro ExpansionIvan Motsch2016-02-111-0/+19
| | | | | | | | | | Attributes MacroExpander implements macros used in git attributes. This is implemented inside the TreeWalk using a lazy created MacroExpander. In addition, the macro expander caches the global and info attributes node in order to provide fast merge of attributes. Change-Id: I2e69c9fc84e9d7fb8df0a05817d688fc456d8f00 Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
* Remove unused API problem filtersMatthias Sohn2016-02-031-116/+0
| | | | Change-Id: I8b1c99b108b4cea6356e0a62e6bfc0731df44cf5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Ignore API errors about Tree, TreeEntry, FileTreeEntry and friends beingShawn Pearce2016-01-191-0/+40
| | | | | | | removed Bug: 486105 Change-Id: I04adcdb68bee7d5f608bb7ab959fe36a890f9ecd
* Add the new class Attributes holding multiple Attribute(s)Ivan Motsch2015-11-271-0/+8
| | | | | | | | | | Attributes represents a semantic collector of Attribute(s) and replaces the anonymous Map<String,Attribute>. This class will be returned by TreeWalk.getAttributes(). It offers convenient access to the attributes wrapped in the Attributes object. Adds preparations for a future Attribute Macro Expansion Change-Id: I8348c8c457a2a7f1f0c48050e10399b0fa1cdbe1 Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
* Remove no longer needed outdated API warning filterMatthias Sohn2015-11-201-6/+0
| | | | | | This fixes a warning saying this filter isn't needed anymore. Change-Id: If77056378befe86c1773950dbe48a82c833fd532 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add an attribute accessor to CanonicalTreeParser and use it in TreewalkChristian Halstrick2015-11-181-0/+14
| | | | | | | | | When checking out a branch we need to access the attributes stored in the tree to be checked out. E.g. directly after a clone we checkout the remote HEAD. In this case index and workingtree are still empty. So we have to search the tree to be checked out for attributes. Change-Id: I6d96f5d095ed2e3c259d4b12124e404f5215bd9f
* Adds the git attributes computation on the treewalkArthur Daussy2015-11-181-0/+14
| | | | | | | | | | | | Adds the getAttributes feature to the tree walk. The computation of attributes needs to be done by the TreeWalk since it needs both a WorkingTreeIterator and a DirCacheIterator. Bug: 342372 CQ: 9120 Change-Id: I5e33257fd8c9895869a128bad3fd1e720409d361 Signed-off-by: Arthur Daussy <arthur.daussy@obeo.fr> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* Fixed typo in preferences: NonByDefault -> NonNullByDefaultAndrey Loskutov2015-11-171-1/+1
| | | | | Change-Id: I6ef5fbdb57e7cba010ad23cb3f6af02891e7fe78 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Silence API errors for new methods added to BitmapBuilderMatthias Sohn2015-11-101-0/+14
| | | | | | | | | | | These API changes were introduced in f523f21e and 73474466. BitmapBuilder is an interface to be implemented by implementors of this interface. According to OSGi semantic versioning rules breaking API changes require update of the minor version only if implementors of the API have to be adapted and the changes do not affect clients of the API. Change-Id: If45d204181ea9bc788b6b57693ca17b1847564c7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update dependencies to use the JGit-internal @NullableTerry Parker2015-11-091-3/+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>
* Delete non empty directories before checkout a pathAndrey Loskutov2015-10-091-0/+8
| | | | | | | | | | If the checkout path is currently a non-empty directory (and was a link or a regular file before), this directory will be removed before performing checkout, but only if the checkout path is specified. Bug: 474973 Change-Id: Ifc6c61592d9b54d26c66367163acdebea369145c Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Set "potentialNullReference" to "error" level and fixed all issuesAndrey Loskutov2015-08-221-1/+1
| | | | | | | | | | | | There should be no functional change, the logic updated only to make code simple so that compiler can understand what is going for. Removed all @SuppressWarnings("null") annotations since they cannot be used if "org.eclipse.jdt.core.compiler.problem.potentialNullReference" option is set to the "error" level. Bug: 470647 Change-Id: Ie93c249fa46e792198d362e531d5cbabaf41fdc4 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Enable annotation based NPE analysis in jgitAndrey Loskutov2015-08-201-3/+3
| | | | | | Bug: 470647 Change-Id: I14d1983bb7c208faeffee0504e0567e38d8a89f3 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Restored obsoleted createSymLink/readSymLink in FileUtilAndrey Loskutov2015-08-181-14/+0
| | | | | Bug: 475070 Change-Id: I425ad842dc26b55f747f192348398a3912c0ca6b Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Move createSymLink/readSymLink to FileUtilsAndrey Loskutov2015-08-171-0/+14
| | | | | | Bug: 475070 Change-Id: I258f4bf291e02ef8e6f867b5d71c04ec902b6bcb Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
* Silence API warnings introduced by a85e817dMatthias Sohn2015-06-171-0/+24
| | | | | | | | | | | a85e817d is a slightly breaking API change to classes that were technically public and technically released in 4.0. However, it is highly unlikely that people were actually depending on public behavior, since there were no public methods to create PushCertificates with anything other than null field values, or a PushCertificateParser that did anything other than infinite loop or throw exceptions when reading. Change-Id: I1d0ba9ea0a347e8ff5a0f4af169d9bb18c5838d2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>