summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* JGit v2.0.0.201206130900-rv2.0.0.201206130900-rMatthias Sohn2012-06-1347-48/+48
| | | | | Change-Id: I685e09b3e37d68614df1b5cc5f687a65cd6eb82d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add org.eclipse.jgit.pgm.feature to enable consumption via p2Matthias Sohn2012-06-1230-0/+1062
| | | | | | | | | | Orion wants to consume the pgm bundle from a p2 repository in their build. Also add corresponding source bundle and feature to provision sources via a target platform. Bug: 373789 Change-Id: I0016ee155553c546606b63d310666eb10bd997e1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Do not set core.autocrlf when creating repoRobin Rosenberg2012-06-122-9/+8
| | | | | | | | | | | | core.autorlf defaults to false, but can be set in the user or "system" config files. Note that EGit/JGit may not know where the "system" config file is located. Also fix pgm's ConfigTest which depends on default repository configuration. Bug: 382067 Change-Id: I2c698a76e30d968e7f351b4f5a2195f0b124f62f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare next 2.0.0-SNAPSHOT buildsMatthias Sohn2012-06-0642-47/+47
| | | | Change-Id: I0d55b390502b3da139ab0d15a6cf3d05774d8ad9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v2.0.0.201206060730-rc3v2.0.0.201206060730-rc3Matthias Sohn2012-06-0642-47/+47
| | | | | Change-Id: I12f8800b74228e71c77f0fb82c250c154d06369f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Use working tree iterator to compare file modes" into stable-2.0Christian Halstrick2012-06-063-24/+81
|\
| * Use working tree iterator to compare file modesKevin Sawicki2012-06-053-24/+81
| | | | | | | | | | | | | | | | | | | | Add isModeDifferent method to WorkingTreeIterator that compares mode with consideration of the core.filemode setting in the config. Bug: 379004 Change-Id: I07335300d787a69c3d1608242238991d5b5214ac Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* | Remove Jetty p2 repository from Maven buildMatthias Sohn2012-06-061-5/+0
| | | | | | | | | | | | | | | | This reference is not required and would force all JGit consumers to switch to Maven 3 and Tycho which isn't desirable. Bug: http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg01687.html Change-Id: Iecf7c5aad46bb05fce0455cc8127aee2f679848c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Get rid of warnings about empty statmentsRobin Rosenberg2012-06-063-5/+14
| | | | | | | | | | | | | | | | In HtttpAuthMethod there were comments, but not in a style that Eclipse recognizes. Change-Id: I64f55b27143f8badcefbb419d3951f2a26b87d5f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Removed unused parameters from private methodsRobin Rosenberg2012-06-062-8/+7
| | | | | | | | | | Change-Id: I60bc03b9550ccd2350918e6328276ec9839748d5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | cleanup: Remove unused declarationsRobin Rosenberg2012-06-064-4/+0
| | | | | | | | Change-Id: I3b54cb9f73cb433c71a441a11ddc74cfecdaa1dc
* | Make FS OS X detection work for OpenJDKRobin Rosenberg2012-06-062-5/+4
|/ | | | | | | OpenJDK sets the os.name system.property to "Darwin", while Apple's version says "Mac OS X". Change-Id: If08f8e7b8ef94ec00023a3f78bbf502ebd9699fb
* Further cleanup of exceptions in Git APIRobin Rosenberg2012-06-0517-65/+129
| | | | | | | | | - Translate internal exceptions to corresponding API exception - Do not catch GitAPI exceptions internally to an internal exception. Just pass them to caller - Mention thrown exceptions in javadoc Change-Id: I9044cf86d2b0bcc8b63b7cc016e1bf0055a62053 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update build to use Tycho 0.15.0Matthias Sohn2012-06-054-42/+2
| | | | | | | | | Also use packaging type eclipse-repository to create the p2 repository since Tycho fixed bug 368596 which we worked around using packaging type eclipse-update-site. Change-Id: Id4ee884027d55cd2d43e8a6ef58a67f74ab488e4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Throw formal CheckoutConflictException on hard resetKevin Sawicki2012-06-051-3/+10
| | | | | | | | | | | | This will allow calling classes to have access to the conflicts that occurred during the attempted checkout. Even though setFailOnConflict(false) is called on the DirCacheCheckout a CheckoutConflictException can still be thrown if cleanup fails. Change-Id: Iea7ad3176a1b0e8606a643de8945e276718eb3ce Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Configure maven-source-plugin execution in parent POMKevin Sawicki2012-06-051-0/+14
| | | | | | | This ensures all modules will have source jars built Change-Id: I11a762f54cc8b059eff3bd99138a7efa9723b19f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Support gitdir: refs in BaseRepositoryBuilder.findGitDirKevin Sawicki2012-06-042-25/+89
| | | | | | | | | | This allows findGitDir to be used for repositories containing a .git file with a gitdir: ref to the repository's directory such as submodule repositories that point to a folder under the parent repository's .git/modules folder Change-Id: I2f1ec7215a2208aa90511c065cadc7e816522f62 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Merge "Relax RevisionSyntaxException to an IllegalArgumentException" into ↵Christian Halstrick2012-06-041-2/+1
|\ | | | | | | stable-2.0
| * Relax RevisionSyntaxException to an IllegalArgumentExceptionRobin Rosenberg2012-06-041-2/+1
| | | | | | | | Change-Id: Ide46eeb6cddcf3111f7c237ba8425a0854a90bfd
* | Merge "Only increment mod count if packed-refs file changes" into stable-2.0Shawn Pearce2012-06-042-10/+52
|\ \
| * | Only increment mod count if packed-refs file changesKevin Sawicki2012-05-282-10/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if a packed-refs file was racily clean then there was a 2.5 second window in which each call to getPackedRefs would increment the mod count causing a RefsChangedEvent to be fired since the FileSnapshot would report the file as modified. If a RefsChangedListener called getRef/getRefs from the onRefsChanged method then a StackOverflowError could occur since the stack could be exhausted before the 2.5 second window expired and the packed-refs file would no longer report being modified. Now a SHA-1 is computed of the packed-refs file and the mod count is only incremented when the packed refs are successfully set and the id of the new packed-refs file does not match the id of the old packed-refs file. Change-Id: I8cab6e5929479ed748812b8598c7628370e79697
* | | Add lazy loading of body for tags to PlotWalkStefan Lay2012-06-041-0/+5
| |/ |/| | | | | | | | | | | This change is required by egit's lazy loading of the body in the history view when the walk is started with setRetainBody(false). Change-Id: I9291ba8c34c8744bc009b1bd302ed28bfa4e9476 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
* | Set minimum Jetty version to 7.6Matthias Sohn2012-06-032-28/+27
| | | | | | | | | | | | | | | | | | | | This reverts commit 0c6e7d71273b2b899f35e974d5a1463ce110fa7e which didn't work since package imports need to be different with Jetty 7.5 and 7.6. Jetty 7.6 can be installed into Eclipse SDK 3.7.2 so rather require Jetty 7.6 instead of adding a lot of reflective code to workaround these incompatible changes. Change-Id: I7eb6413ecf2bc4ad7bef0c70cde45ae3fde02b2f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Fix compile error when using Jetty 7.5Matthias Sohn2012-06-031-0/+1
| | | | | | | | | | | | | | | | | | Class Constraint was moved from package org.eclipse.jetty.http.security in Jetty 7.5 to package org.eclipse.jetty.util.security in Jetty 7.6. Hence also import package org.eclipse.jetty.security, then also Jetty 7.5, coming with Indigo, can be used to run JGit HTTP tests. Change-Id: I26c38ec9f51b0a4fb62e1aa9f2266ada7bb2fa0c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Revert Jetty from 8.1.3.v20120416 to 7.6.0.v20120127Matthias Sohn2012-06-0310-60/+47
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 24a0f47e32ab7cdf20c2201d7100599ea057f8a3 and updates JGit dependencies to use the latest available Jetty 7.x release. We can't use Jetty 8.x since it depends on Servlet API 3.0 which requires Java 6 but JGit still wants to support Java 5. Use one of the target platforms defined in Ibf67a6d3539fa0708a3e5dbe44fb899c56fbd8ed to work with that in Eclipse. Change-Id: I343273d994dc7b6e0287c604e5926ff77d5b585b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Use default thread pool to prevent thread pool starvationMatthias Sohn2012-06-031-17/+1
| | | | | | | | | | | | | | Bug: 380302 Change-Id: Ie66d495481776469ff2aa603c550557cff82cafc Suggested-By: Joakim Erdfelt <joakim@intalio.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "Reduce number of hard-coded maven artifact versions" into stable-2.0Robin Rosenberg2012-05-314-9/+9
|\ \
| * | Reduce number of hard-coded maven artifact versionsMatthias Sohn2012-05-314-9/+9
| | | | | | | | | | | | | | | | | | | | | This reduces the number of hard-coded version numbers we have to touch with every release. Change-Id: I0f2e910423d3db081b644968cd0d6a89178ba12a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Remove obsolete GitlinksNotSupportedExceptionRobin Rosenberg2012-05-311-65/+0
| | | | | | | | | | | | Change-Id: Idddd86818858b229e68b4a46597fc67547bcce17
* | | Update ORIG_HEAD when resettingKevin Sawicki2012-05-315-3/+46
|/ / | | | | | | | | | | | | | | | | | | | | | | Write the old object id from the RefUpdate to the ORIG_HEAD file after the update completes. Add two new convenience methods to Repository to read and write the ORIG_HEAD reference similar to the methods for reading/writing CHERRY_PICK_HEAD and MERGE_HEAD. Bug: 375525 Change-Id: I120b3b2cd3b1ddae88fce435285bae15cbf96f5e
* | Prepare next 2.0.0-SNAPSHOT buildsMatthias Sohn2012-05-3142-51/+51
| | | | | | | | Change-Id: Iffc57d6b25dafb72272d1957116c19ab45ba2c54 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | JGit v2.0.0.201205301645-rc2v2.0.0.201205301645-rc2Matthias Sohn2012-05-3042-51/+51
| | | | | | | | | | Change-Id: Ic4f84f1a11c93863c229c0089f2e4edc7c7a36b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Git API does not declare GitAPIException call() and related cleanupsRobin Rosenberg2012-05-3063-303/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All commands should throw a GitAPIException so new exceptions can be added without breaking the builds of old code, i.e. anyone that calls a Git API should catch GitAPIException and not just the currently known exceptions. Now the only checked exceptions on Git API calls are GitException and subclasses of it. New checked exceptions that are subclasses of GitException may be added without breaking the API. Javadoc for GitAPIException is declared on GitCommand and inherited to subclasses. JGitInternalException is not explicitly documented anymore. Unfortunately this change itself breaks the API. The intention is that it shall be possible to add new checked subclasses of GitAPIException without breaking the API. Bug: 366914 EGit-Change-Id: I50380f13fc82c22d0036f47c7859cc3a77e767c5 Change-Id: I50380f13fc82c22d0036f47c7859cc3a77e767c5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "Retain file length and mod time when doing a mixed reset" into stable-2.0Robin Rosenberg2012-05-301-6/+43
|\ \
| * | Retain file length and mod time when doing a mixed resetKevin Sawicki2012-05-281-6/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the index was cleared and updated with a new tree. Now the commit being reset to and the index are iterated over in a tree walk and the current index mod time and file length are copied over to the new dir cache entry being written if the object ids are the same. Change-Id: Iaf9e624efb0bf90f9e05fcb0587dde4dec50000c
* | | Merge "Update smudged entries when writing index" into stable-2.0Robin Rosenberg2012-05-305-3/+290
|\| |
| * | Update smudged entries when writing indexKevin Sawicki2012-05-285-3/+290
| |/ | | | | | | | | | | | | | | | | | | | | Overload DirCache.lock to take a repository that is used for updating smudged index entries with information from the repository's working tree. New unit tests are also added for updating smudged index entries on reset, checkout, and commit. Change-Id: I88689f26000e4e57e77931e5ace7c804d92af1b6
* / Enable loading history until a given commitMatthias Sohn2012-05-302-0/+206
|/ | | | | | | This is needed to allow jumping to a selected commit when loading history incrementally. Change-Id: Id3b97d88d3b4b2d67561b11f8810cb88fe040823 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update Jetty to 8.1.3.v20120416Matthias Sohn2012-05-2312-52/+90
| | | | | | | | Jetty 8.1.3 comes with Juno M7 and this version can be installed from http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/8.1.3.v20120416/ Change-Id: Ifc4bfbb3efbab0f5bfbde74f0b2ddc5a2f9ee6a5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add config --list command to pgmTomasz Zarna2012-05-234-0/+193
| | | | | | | Currently, only --list option is supported with --global, --system, --local and --file switches. Change-Id: I9b179b162996520e95c4e001dccd65c566a4bd27 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Ensure resetting on commit idDariusz Luksza2012-05-232-1/+21
| | | | | | | | | When reset command was called with tag name as parameter the resulting HEAD was set to the tag's SHA-1 which is a bug. This patch ensures that repository.resolve() call always returns commit id. Change-Id: I219b898c620a75c497c8652dbf4735fd094c4d7c Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Move NLS test for HttpServerText to http.testShawn O. Pearce2012-05-224-13/+60
| | | | | | | This never should have been in the core library test suite, as that test suite never should depend upon the HTTP server module. Change-Id: Ie0528c4d1c755823303d138e327a3a2f4caccc32
* Fix JGit source bundle packagingMatthias Sohn2012-05-213-1/+41
| | | | | | | | | | | Due to Tycho bug 368596 we didn't package the correct JGit source bundle anymore. Instead of sources it contained the binary bundle. As a workaround fall back to use packaging type eclipse-update-site which doesn't seem to have this problem. Bug: 368596 Bug: 379402 Change-Id: I3192dbd00b51e6ee6596d2301050b2a6f7028e3b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Smudge index entries on first write (too), as well when readingRobin Rosenberg2012-05-214-18/+66
| | | | | | | | | | | That happens when the index and a new file is created within the same second and becomes a problem if we then modify the newly created file within the same second after adding it to the index. Without smudging JGit will, on later reads, think the file is unchanged. The accompanying test passed with the smuding on read. Change-Id: I4dfecf5c93993ef690e7f0dddb3f3e6125daae15
* Add user friendly output from jgit commit commandMikael Karlsson2012-05-181-1/+6
| | | | | | | | Instead of printing the stack trace from the JGitInternalException thrown from CommitMessage.call(), print just the exception message, using the Die exception. Change-Id: I9ec3eb02eb001813fa15ac6f90a606223dcdafdc
* Don't swallow JSchException "Auth fail" exceptionDariusz Luksza2012-05-161-1/+2
| | | | | | | | | "Auth fail" exception was swallowed during retrying, this leads to "Session down" exception during clone operation with invalid SSH keys. Bug: 336795 Change-Id: Id8d9e83b10f4f2a01e0cf89819190bb23a04a2b9 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
* Enable call chaining on LsRemoteCommand methodsDave Borowitz2012-05-141-4/+10
| | | | Change-Id: I706332386415892d7a964b241442832ad79fa223
* Factor a base class out of ReceivePackDave Borowitz2012-05-146-1132/+1322
| | | | | | | | | | | | We are working on a publish/subscribe based git protocol, and we want to reuse several parts of the ReceivePack-like code for reading commands and processing a pack. In this new implementation, the connection management will be very different, in particular, there may be multiple packs received on a single open connection. So, hoist out as much as we can from ReceivePack, mostly just leaving behind the single-connection version in that class. Change-Id: I5567aad6ae77951f73f59c1f91996d934ea88334
* Add --all switch to org.eclipse.jgit.pgm.CommitTomasz Zarna2012-05-103-2/+11
| | | | | Change-Id: Iab52f995676daf60e0dfa043cc9e022f6e32a758 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Cleanup MergeResult constructorsTomasz Zarna2012-05-101-6/+8
| | | | | | | | 'mergeStrategy' should be 5th argument, after 'mergeStatus'. Pass 'description' if available. Change-Id: I97cebfe5d7db6247fe899075d917b82955906f85 Signed-off-by: Chris Aniszczyk <zx@twitter.com>