summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 3.3.0-SNAPSHOT buildsMatthias Sohn2013-12-0551-242/+242
| | | | | Change-Id: I7c7e7c1beec0c5d15b96c14c73ce93e3f09855c8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Implement rebase.autostashStefan Lay2013-12-046-23/+276
| | | | | | | This feature was introduced in native git with version 1.8.4. Bug: 422951 Change-Id: I42f194174d64d7ada6631e2156c2a7bf93b5e91c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "CLI status should support --porcelain"Matthias Sohn2013-12-043-8/+236
|\
| * CLI status should support --porcelainKaloyan Raev2013-12-043-8/+236
| | | | | | | | | | | | | | | | Add support for the machine-readable output format along with the existing default long format. Bug: 419968 Change-Id: I37fe5121b4c9dbae1106b1d18e9fdc134070a9dd Signed-off-by: Kaloyan Raev <kaloyan.r@zend.com>
* | Merge "More helpful InvalidPathException messages (include reason)"Christian Halstrick2013-12-045-24/+52
|\ \ | |/ |/|
| * More helpful InvalidPathException messages (include reason)Robin Stocker2013-12-035-24/+52
| | | | | | | | | | | | | | | | | | | | Instead of just a generic "Invalid path: $path", add a reason for the cases where it's not obvious what the problem is (e.g. "aux" being reserved on Windows). Bug: 413915 Change-Id: Ia6436bd2560e4f049c92d9aac907cb87348605e0 Signed-off-by: Robin Stocker <robin@nibor.org>
* | Fix IgnoreRule#isMatch returning wrong result due to missing resetRobin Stocker2013-12-032-0/+13
|/ | | | | | | | | | The matcher has to be reset before using it, as was already done in the other cases. Bug: 423039 Change-Id: I87abaa7ad7f0aac8651db6e88d41427cacb4d776 Also-by: Ondrej Vrabec <ovrabec@netbeans.org> Signed-off-by: Robin Stocker <robin@nibor.org>
* Fix exception on conflicts with recursive mergeRobin Stocker2013-12-036-27/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are conflicts with a recursive merge, the conflicting paths are stored in unmergedPaths (field in ResolveMerger). Later, when the MergeResult is constructed in MergeCommand, getBaseCommit is called, which computes the merge base a second time. In case of RecursiveMerger, getBaseCommit merges the multiple merge bases into one. It does this not by creating a new ResolveMerger but instead calling mergeTrees. The problem with mergeTrees is that at the end, it checks if unmergedPaths is non-empty and returns false in that case. Because unmergedPaths was already non-empty because of the real merge, it thinks that there were conflicts when computing the merge base again, when there really were none. This can be fixed by storing the base commit when computing it and then returning that instead of computing it a second time. Note that another possible fix would be to just use a new ResolveMerger for merging the merge bases instead. This would also remove the need to remember the old value of dircache, inCore and workingTreeIterator (see RecursiveMerger#getBaseCommit). Bug: 419641 Change-Id: Ib2ebf4e177498c22a9098aa225e3cfcf16bbd958 Signed-off-by: Robin Stocker <robin@nibor.org>
* Add pgm test for checkout of existing branch with checkout conflictAxel Richard2013-12-021-0/+26
| | | | | | | | | | Add a test that checks out an existing branch with a dirty working tree and involves a checkout conflict. This test should pass with a message: "error: Your local changes to the following files would be overwritten by checkout: a". Change-Id: I5428a04a7630d9e0101404ea1aedd796f127bd7d Signed-off-by: Axel Richard <axel.richard@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix broken symbolic links on Cygwin.John Ross2013-12-021-4/+4
| | | | | | | | | | Bad files from symbolic links were being generated on Cygwin and required resolution by the appropriate FS. Pass FS to getSymRef and call FS.resolve before asking if the file is absolute. Bug: 419494 Change-Id: I74aa7a285954cade77f41df6f813b6dafb5d6cd7 Signed-off-by: John Ross <jwross@us.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Do not allow non-ff-rebase if there are uncommitted changesStefan Lay2013-12-024-35/+240
| | | | | | | | | | | | | With this change jgit checks for uncommitted changes before a rebase is started. This is also done by native git. One reason is that an abort would override such changes. The check is skipped for a non-interactive rebase when it will result in a fast-forward. In this case there can be only checkout conflicts but no merge conflicts, so there cannot be an abort which overrides uncommitted changes. Bug: 422352 Change-Id: I1e0b59b2a4d80a686b67a6729e441924362b1236 Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Manage CheckoutConflictException in pgmAxel Richard2013-11-293-0/+12
| | | | | Change-Id: I49f92bf7cafc80404f0bd07d62ff4b25e4db6e7c Signed-off-by: Axel Richard <axel.richard@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix handling of file/folder conflicts during a checkoutChristian Halstrick2013-11-292-1/+32
| | | | | | | | | | | | | | | | | | | | JGit was not handling certain file/folder conflicts during a checkout correctly. This was reported by Axel Richard in http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02358.html. This commit fixes this problem. Still JGit behaves intentionally different than native git. If HEAD contains a tree, and workingtree, Index and Merge contain a file with same content ... then JGit allows a conflict free checkout of Merge. Native git always complains that it doesn't want to overwrite local changes. But there is no need to update the working tree because Index and Merge are already equal. A shell script which shows how native git behaves can be found here. https://gist.github.com/chalstrick/7694959#file-gistfile1-sh Change-Id: Ifd6a68974d61cd4fa23bc575f3a40773db66cafc Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* Mention null return in Javadoc of Config#getStringRobin Stocker2013-11-291-2/+2
| | | | | Change-Id: Ibf09395fb3ac4d5d8f47872ed8f239c821bbee7a Signed-off-by: Robin Stocker <robin@nibor.org>
* Fix applying stash on other commitStefan Lay2013-11-292-0/+88
| | | | | | | | Applying a stash on another commit failed because the merge base for the cherry-pick of the stashed index state was not corectly set. Bug: 422684 Change-Id: I9355352b2b9a7abefa3248ca3c17a9301177d0d6 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
* Use static factory methods instead of overloaded constructorsStefan Lay2013-11-292-18/+27
| | | | Change-Id: Ib10e0798dcfb9f1b611caec393926c95eff4c2a2
* Break up GCTest to run in parallelShawn Pearce2013-11-2411-777/+1226
| | | | | | | | Separate some sections of the GC tests into different test classes. Individual classes permits running in parallel under Buck, reducing test latency if there are sufficient CPUs available. Change-Id: I5eb177f78efd4aa8ac857d0d8b1a1fd81ca07790
* Modify T0004_PackReaderTest to use existing packShawn Pearce2013-11-241-10/+10
| | | | | | | | Instead of making a new PackFile from a resource, lookup the existing PackFile that was already created by the base class SampleDataRepositoryTestCase. Change-Id: Ib5da18c832ae0cb29703706b99e99503f5cc819d
* Move SampleDataRepositoryTestCase to org.eclipse.jgit.testShawn Pearce2013-11-2416-16/+19
| | | | | | | | This class requires resources which are private to another bundle. Move the class next to its resources, removing an odd cross bundle dependency. Change-Id: I30d5568b09ea5fb3bd3bb60b602f149c0867f49a
* Support running from JARs in JGitTestUtilShawn Pearce2013-11-242-5/+38
| | | | | | | | Buck invokes JUnit tests from compiled JARs, not class directories. When copying a resource back to the filesystem a jar: style URL is obtained from the ClassLoader. Change-Id: I28d702484ec13b0b309b87990da867050e4b5ec6
* Cache SimpleDateFormat in GitDateParser per localeMatthias Sohn2013-11-236-34/+133
| | | | | | | | | | Otherwise switching to another locale yields wrong results when parsing date strings in GitDateParser. Since the MockSystemReader explicitly uses english locale the tests need to specify the locale to be used when parsing date strings. Bug: 420772 Change-Id: I313ef6b1e9ef3bfb43d929ce34712ebd21f2cd9c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix FIXUP error for blank lines in interactive rebaseStefan Lay2013-11-222-1/+39
| | | | | | | | Empty lines of discarded commit messages were added to the commit message because they were not commented out properly. Bug: 422246 Change-Id: I263e8a6b30a3392d8b4f09c0695505068a0a485d Signed-off-by: Stefan Lay <stefan.lay@sap.com>
* Fix parsing Rebase todo lines when commit message is missingStefan Lay2013-11-212-0/+15
| | | | | Bug: 422253 Change-Id: I9739b16c91d2df31a481360a712d3479a4eeee2e Signed-off-by: Stefan Lay <stefan.lay@sap.com>
* Add close() method to APIChristian Halstrick2013-11-202-0/+48
| | | | | | | | | | | The API in org.eclipse.jgit.api does allow to open repositories but it did not allow to close them. This commit fixes this and allows API users to close a repository without having to use lower-level classes. Bug: 420502 Change-Id: I866225cc8534ae5916113fa24eb1c7513fd4472e Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Update Jetty to 7.6.14.v20131031Matthias Sohn2013-11-183-35/+35
| | | | Change-Id: Icb7f91e40d2a216fda519c64a94d5ad18eac683c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge "Don't delete .idx file if .pack file can't be deleted"Robin Rosenberg2013-11-172-18/+75
|\
| * Don't delete .idx file if .pack file can't be deletedChristian Halstrick2013-11-132-18/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If during an garbage collection old packfiles are deleted it could happen that on certain platforms the index file can be deleted but the packfile can't be deleted (because someone locked the file). This led to repositories with packfiles without corresponding index files. Those zombie-packfiles potentially consume a lot of space on disk and it is never tried to delete them again. Try to avoid this situation by deleting packfiles first and don't try to delete the other files if we can't delete the packfile. This gives us the chance to delete the packfile during next GC. This commit only improves the situation - there is still the chance for orphan files during packfile deletion. We don't have an atomic delete of multiple files . Change-Id: I0a19ae630186f07d0cc7fe9df246fa1cedeca8f6
* | Document that path parameters should use '/' as separatorRobin Stocker2013-11-1514-22/+36
| | | | | | | | | | | | Bug: 421600 Change-Id: I505d994518aa608aaa797252433b6c97e2def5b4 Signed-off-by: Robin Stocker <robin@nibor.org>
* | Improve Javadoc for typeHint parameterRobin Stocker2013-11-143-15/+17
| | | | | | | | | | | | | | Link to an example type constant. Change-Id: I214ab834fa02901a38e6048a94a5224b30c5d93f Signed-off-by: Robin Stocker <robin@nibor.org>
* | Do not update the ref hot bit when checking isIndexLoadedColby Ranger2013-11-132-1/+5
| | | | | | | | | | | | | | | | | | | | DfsPackFile.isIndexLoaded() uses the DfsBlockCache.Ref.get() method to check if the index loaded. However, using the get() method marks a hot bit in the cache, which can cause the index to never be unloaded and seem hotter than it really is. Add a has() method which only checks if the value is not null and does not update the hot bit. Change-Id: I7e9ed216f6e273e8f5d79ae573973197654419b4
* | Update to Ant 1.9.2Matthias Sohn2013-11-121-1/+1
| | | | | | | | | | CQ: 7698 Change-Id: I2ae580041eb334c613969bc9d66d169d08c12c4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "Add missing @since tags"Matthias Sohn2013-11-127-0/+14
|\ \
| * | Add missing @since tagsMatthias Sohn2013-11-097-0/+14
| | | | | | | | | | | | Change-Id: Ic4fabec818d6fe336d3256ddc95934271272914a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Add uses directives to ensure OSGi wires jgit bundles correctlyMatthias Sohn2013-11-125-37/+129
| | | | | | | | | | | | | | | | | | | | | | | | See http://spring.io/blog/2008/10/20/understanding-the-osgi-uses-directive/ Bug: 420903 Change-Id: I3706a2b8f695d4ce0ee2333722ed7b8d31032f1e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Introduce Kepler and Luna target platformMatthias Sohn2013-11-124-2/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need this to enable building jgit with dependencies from Orbit version used by Luna. Default target platform is Kepler. In order to use Luna run mvn clean install -P platform-luna -f org.eclipse.jgit.packaging/pom.xml Change-Id: I544516d97067f45d1034929b534ad1600136614d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Update build to use Tycho 0.19Matthias Sohn2013-11-111-2/+2
| |/ |/| | | | | Change-Id: I90f71f2612a934e83a0af8dccfe08592e4532ddf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | [findBugs] Remove nonsense callMatthias Sohn2013-11-101-1/+0
| | | | | | | | | | | | Result of c.containsAll(c) is always true for any collection c. Change-Id: I853cbb44bdc03e2b54229bb9c36ae42e02dcc4d9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove unnecessary @SuppressWarnings("null")Matthias Sohn2013-11-101-5/+0
| | | | | | | | Change-Id: I5bddcdab2c5cc92622144a7b207bad90cb601609 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Grant access to internal jgit package to org.eclipse.jgit.junitMatthias Sohn2013-11-101-1/+2
| | | | | | | | | | | | | | This silences some discouraged access warnings issued since TestRepository uses PackWriter which is in an internal package. Change-Id: Ic9c4631e237c2fe1996c518328ecc2a9ab5c348b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Remove duplicate package exportMatthias Sohn2013-11-101-3/+0
| | | | | | | | Change-Id: I185610f12069cd4ce1b27650581375b6b3019d2f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Don't import non-existing package org.eclipse.jgit.java7Matthias Sohn2013-11-102-2/+0
|/ | | | Change-Id: Idc48cb1995050913498d2bad97a8e6e330dee94c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Interactive Rebase: Do actions if there were conflictsStefan Lay2013-11-082-80/+324
| | | | | | | | | If a commit was marked for edit, reword, squash or fixup, but the interactive rebase stopped because of a conflict, the step was not done after conflict resolution. This is done now. Change-Id: If8e7ccc50469165744f2b8a53d180f9ba0f72330 Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Rebase interactive should finish if last step is editStefan Lay2013-11-062-9/+47
| | | | | | | | When the last step was an edit step, rebase interactive did not finish after continuing the rebase. Instead, it returned with the status FAST_FORWARD. Change-Id: Ib19857474ac089dfeaae665ad5e95c66c21099b0
* Merge changes I40f2311c,I3c419094Matthias Sohn2013-11-057-12/+620
|\ | | | | | | | | | | * changes: Add additional RebaseResult for editing commits Add Squash/Fixup support for rebase interactive in RebaseCommand
| * Add additional RebaseResult for editing commitsStefan Lay2013-11-053-9/+20
| | | | | | | | | | | | | | | | | | With the new RebaseResult.EDIT a client can now distinguish if rebase stopped due to a conflict or because the commit was marked for edit in an interactive rebase. Change-Id: I40f2311cf43ed5f290dcda65a7bd85ba770a85f5 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
| * Add Squash/Fixup support for rebase interactive in RebaseCommandTobias Pfeifer2013-11-056-3/+600
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rebase command now supports squash and fixup. Both actions are not allowed as the first step of the rebase. In JGit, before any rebase step is performed, the next commit is already cherry-picked. This commit keeps that behaviour. In case of squash or fixup a soft reset to the parent is perfomed afterwards. CQ: 7684 Bug: 396510 Change-Id: I3c4190940b4d7f19860e223d647fc78705e57203 Signed-off-by: Tobias Pfeifer <to.pfeifer@web.de> Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge changes ↵Shawn Pearce2013-11-0530-136/+412
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | I85470d1d,I43711486,Ie6ade781,Ic9ab2b6e,Iebe50933,Id6fac253,Ia6becf30,I2af8b0ac * changes: Use absolute paths for file:// URIs in tests Use getPath() in FileResolverTest Extract protocol constants to a common class Move repeat() to utility class for tests Remove hardcoded target/trash from test cases Remove dependency on StatusCommandTest Remove dependency on DiffFormatterReflowTest Remove unnecessary import of BaseConnection in MessageWriter
| * Use absolute paths for file:// URIs in testsShawn Pearce2013-11-019-31/+44
| | | | | | | | | | | | | | | | When run under Buck the repository paths may be relative. Request an absolute path to construct the URI, as relative paths are not supported in file:// style URIs. Change-Id: I85470d1db2f4e80cba30f1559c0d99bdfa8ac410
| * Use getPath() in FileResolverTestShawn Pearce2013-11-011-1/+1
| | | | | | | | | | | | | | Necessary to get tests to pass when running under Buck. Has no impact on Maven based invocation of tests. Change-Id: I437114863df0bac346c94ef13796def47333d916
| * Extract protocol constants to a common classShawn Pearce2013-11-017-50/+202
| | | | | | | | | | | | This avoids the server from referencing the client code directly. Change-Id: Ie6ade781b5a689646ad8b0b2988ef2b544412195