summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Add missing @since tags to mark API added in 2.0Matthias Sohn2012-05-1025-22/+111
| | | | | | Change-Id: I0a86ce0e393dfde9bb27f0b29e036e76c856396e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Update tycho version to 0.14.1Matthias Sohn2012-05-1016-343/+20
| | | | | | | | | | | | | Tycho 0.14.1 enforces that artifactId and feature/bundle SymbolicName must match, hence follow recommended migration practice and change groupId of feature projects in order not to change the feature names as this would require a feature migration. Also migrate the p2 repository build from the deprecated packaging type eclipse-update-site to packaging type eclipse-repository. Change-Id: I99fc6c2bbb20efbd6514bdd9940f3535707c21bc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update packaging project to build using Indigo platformMatthias Sohn2012-05-101-2/+2
| | | | | Change-Id: I4c07112a6723d90d3677761f5476af00ead58282 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove throws IOException declaration on filterCleanKevin Sawicki2012-05-101-1/+1
| | | | | | | | | This method only creates an EolCanonicalizingInputStream which does not throw an IOException and so the throws declaration on the method is unneeded. Change-Id: Icae8b80006c5e3ffcf3b69790a1a45c505be0f05 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add Object type to Comparable implements declarationKevin Sawicki2012-05-101-1/+1
| | | | | | | | | This removes unchecked warnings when a List of AnyObjectId objects or any of its subclasses are passed to Collections.sort such as in PackWriter Change-Id: I806732cee24349c75c0357a655df55b070f2f213 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove 4 unboxed warningsKevin Sawicki2012-05-102-3/+4
| | | | | | | Use Integer.intValue to explicitly convert to an int Change-Id: I1135ed01af4e274b26d6b07d1a50f48ef0a30d91 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Make output stream optional in DiffCommandKevin Sawicki2012-05-102-10/+33
| | | | | | | | | | | | Use the NullOutputStream.INSTANCE value when the configured output stream is null or the command is configured to only show name and status. Also only set the context and prefix options if formatting is actually being performed. Bug: 377157 Change-Id: I333cfcc82ee746f3c6a8e94c09dcc803ffbb4b3a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Compare modes before comparing ids in ResolveMergerKevin Sawicki2012-05-091-2/+2
| | | | | | | | Comparing ids can be more expensive so do the cheap mode check first and short circuit the id comparison when modes are non-equal Change-Id: I671eda51c74a411cc27de9d6077cc76e816ebe2b
* Remove 86 boxing warningsKevin Sawicki2012-05-0832-96/+160
| | | | | | | | Use Integer, Character, and Long valueOf methods when passing parameters to MessageFormat and other places that expect objects instead of primitives Change-Id: I5942fbdbca6a378136c00d951ce61167f2366ca4
* Remove unnecessary boxing SuppressWarnings annotationKevin Sawicki2012-05-081-1/+0
| | | | Change-Id: Id8a6d9f96860742f9094efdb4f31a952be7d3025
* Remove unneeded catch block and null checksKevin Sawicki2012-05-041-12/+4
| | | | | | | | The catched exception was just rethrown and the null check of the locked dir cache was unneeded if the assignment was done outside the try block. Change-Id: If2ee1f3eff3849f8da51eab825057fc56e166a94
* Fix two typos in CLIText.propertiesTomasz Zarna2012-05-021-2/+2
| | | | Change-Id: Id1429d52c88a9e2b888e6c6906cf8148945bd2ca
* Merge "Update README regarding CRLF conversion, /etc and $HOME"Matthias Sohn2012-04-301-3/+16
|\
| * Update README regarding CRLF conversion, /etc and $HOMERobin Rosenberg2012-04-291-3/+16
| | | | | | | | Change-Id: I3c41a8ee7f500e2c39df94eaf5d87c234934b741
* | Validate paths during DirCheckoutRobin Rosenberg2012-04-239-8/+635
|/ | | | | | | | | | | | | | | | | | | DirCacheCheckout and CanonicalTreeParser cooperate. CanonicalTreeParser can detect malformed, potentially malicious tree entries and sets a flag, while DirCacheCheckout refuses to work with such paths. Malicious tree entries are ".", "..", ".git" (case insensitive), any name containing '/' and (on Windows '\') and also (on Windows) any paths ending in a combination of '.' or space or containing a ':'. We also forbid all special names like "con" etc on Windows. Some of the test can execute on any platform by enabling partial platform emulation. A new runtime exception, InvalidPathException, is introduced. For backwards compatibility it extends InvalidArgumentException. Change-Id: I86199105814b63d4340e5de0e471d0da6b579ead Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Enable large file supportRobin Rosenberg2012-04-183-9/+244
| | | | | | | | Allow adding files with size over 2 GB. The drawback is that the tests for huge file support adds roughly 10 minutes of execution time. For that reason we @Ignore the test in the standard test execution. Change-Id: I5788e8009899203b346f353297166825b3744575
* Allow to write tests with CLI syntaxTomasz Zarna2012-04-1825-1/+1304
| | | | | | | CQ: 6385 Bug: 365444 Change-Id: I2d5164cd92429673fe3c37e9f5f9bc565192cc12 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Enable DirCacheEntry's copyMetaData to not copy stage infoRobin Rosenberg2012-04-173-4/+77
| | | | | | | When there is a conflict sometimes we did not set the stage of the conflict entries properly for the STAGE_1 entry. Change-Id: I1c28ff6251fdbc95f7c40fc3e401f1b41157a9f6
* Merge "Fix tests for Ant task "git-clone""Christian Halstrick2012-04-171-5/+6
|\
| * Fix tests for Ant task "git-clone"Matthias Sohn2012-04-021-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If project.init() isn't called GitCloneTaskTest fails when started from Eclipse, according to [1] calling init() is necessary to properly initialize the Ant project programmatically. Always set the destination folder in order to ensure that all test resources are created under the project's target folder and do not pollute the project's source tree with test data. [1] http://ant.1045680.n5.nabble.com/project-createTask-not-working-with-ant-1-8-2-td3385716.html Change-Id: Icbeb62680b018a92673faa58828b5e850564c7a8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Hide two warnings about boxingRobin Rosenberg2012-04-161-0/+2
| | | | | | | | Change-Id: I1cb7cdb81481019f4a55221d38d771fcc9451529 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Fix constructor for SafeBufferedOutputStreamRobin Rosenberg2012-04-141-1/+4
| | | | | | | | | | | | | | The size shoould be passed to BufferedOutputStream's constructor. All callers seem to use the default, but that could change. Change-Id: I874afee6a9114698805e36813781547e6aa328a5
* | Merge "UnsupportedCredentialItem with password authentication"Robin Rosenberg2012-04-091-6/+15
|\ \
| * | UnsupportedCredentialItem with password authenticationRobin Rosenberg2012-04-091-6/+15
| | | | | | | | | | | | | | | | | | | | | If the server prompts for password, it comes as a StringType prompt. Bug: 360862 Change-Id: Ic758456c21c8d68d1b3d7f56228beb7535b11735
* | | Merge "Fix broken TagCommand API"Robin Rosenberg2012-04-067-54/+57
|\ \ \