summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Tag som non-localizable strings with NON-NLSRobin Rosenberg2014-01-1010-22/+19
| | | | Change-Id: I6882c98c2785f38241a81ba5b93892aab79690a5
* Add missing package import for org.eclipse.jgit.archiveMatthias Sohn2014-01-071-0/+1
| | | | | | The archive bundle needs access to the nls package since 2ecc27db. Change-Id: I76882e1f270296c5ce8e220e1946c4a8ddb6fdf5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove unused import from ArchiveTestMatthias Sohn2014-01-071-1/+0
| | | | | | This unnecessary import was introduced by 2ecc27d. Change-Id: I5cb415de7e33428d9f95dfbe1e214ef24be9dad9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Suppport the GIT_CONFIG_NOSYSTEM environment variableRobin Rosenberg2014-01-063-2/+25
| | | | Change-Id: If3cc05931683d396b5ae2ea8952adceeb9a82ab9
* Merge "archive: Use an empty directory for submodules"Dave Borowitz2013-12-272-3/+50
|\
| * archive: Use an empty directory for submodulesJonathan Nieder2013-12-272-3/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When encountering a submodule entry, "jgit archive" tries to write its content verbatim as an entry to the archive, which fails with a JGitInternalException wrapping a MissingObjectException because the submodule repository commits are typically not part of the superproject. When a subproject is available (for example because it has been checked out as a subdirectory of a superproject worktree), it would be nice to recurse into it and make one archive recording the state of the entire project. Unfortunately sometimes the subproject is not available or it can be hard to find (e.g., it can be on another server). Even when some subprojects are available, "jgit archive" should not produce different output for the same tree depending on which subprojects it has easy access to, so there is no obvious good default behavior that recurses without relying on access to all subprojects. Instead, replace each submodule entry with a placeholder empty directory. "git archive" does the same. Change-Id: I1295086037b77fc948b3f93c21d47341e25483e5 Signed-off-by: Jonathan Nieder <jrn@google.com>
* | Merge "archive: Include entries for directories"Dave Borowitz2013-12-276-26/+143
|\|
| * archive: Include entries for directoriesJonathan Nieder2013-12-276-26/+143
| | | | | | | | | | | | | | | | | | | | | | | | Entries for directories are optional and mostly wasted space in most archive formats (except as a place to hang ownership and filesystem permissions), but "git archive" includes them. Follow suit. This will make it easier in a later change to include empty directories as placeholders for missing submodules. Change-Id: I1810c686bcc9eb4d73498e4d3e763e18787b088a Signed-off-by: Jonathan Nieder <jrn@google.com>
* | [CLI] Add option --millis / -m to debug-show-dir-cache commandMatthias Sohn2013-12-272-3/+13
| | | | | | | | | | | | | | | | | | | | | | This is useful when comparing mtime displayed by $ jgit debug-show-dir-cache -m with mtime displayed by $ git ls-files --debug or $ stat "%m" Change-Id: Id133ebe6f6093a56a6a6645e1c5bb18752fb2fd0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-3.2'Matthias Sohn2013-12-190-0/+0
|\ \ | |/ |/| | | | | | | | | | | | | | | | | * stable-3.2: Prepare post 3.2.0 builds JGit v3.2.0.201312181205-r Revert "Fix for core.autocrlf=input resulting in modified file..." Fix for core.autocrlf=input resulting in modified file and unsmudge Change-Id: I6650642c3511f5a41d673e561fec8204208d428d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare post 3.2.0 buildsstable-3.2Matthias Sohn2013-12-1851-51/+51
| | | | | | | | | | Change-Id: Ie2bfdee0c492e3d61d92acb04c5bef641f5f132f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.2.0.201312181205-rv3.2.0.201312181205-rMatthias Sohn2013-12-1851-51/+51
| | | | | | | | | | Change-Id: Id00a8baf7d3ffefb210f03cd99f69d55411166fe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Revert "Fix for core.autocrlf=input resulting in modified file..."Matthias Sohn2013-12-187-200/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1def0a1257d32bce08e751242733cda3b2036cb8. We found this fix uncovers problems with unsmudged DirCacheEntry's. This surfaced because egit's ui test CreatePatchActionTest failed since jgit computes a wrong status. JGit doesn't detect modified content in now unsmudged entries. Hence revert this change until these problems are fixed. Change-Id: Ia04277ce316d35fc5b0d82c93d2078b856af24bb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
| * Fix for core.autocrlf=input resulting in modified file and unsmudgeRobin Rosenberg2013-12-187-20/+200
| | | | | | | | | | | | Bug: 372834 Change-Id: Idafad150553df14827eccfde2e3b95760e16a8b6 Also-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | archive: Prepend a specified prefix to all entry filenamesJonathan Nieder2013-12-175-1/+115
| | | | | | | | | | | | | | | | | | | | Common practice when distributing tarballs is to prefix all entries with a single directory name so when the tarball is extracted it all falls neatly into a single directory. Add a setPrefix() method to ArchiveCommand to support this. Change-Id: I16b2832ef98c30977f6b77b646728b83d93c196f Signed-off-by: Jonathan Nieder <jrn@google.com>
* | Merge branch 'stable-3.2'Matthias Sohn2013-12-138-59/+361
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.2: Canonicalize worktree path in BaseRepositoryBuilder if set via config Add missing @since tags for new public methods in Config Don't use API exception in RebaseTodoLine Fix aborting rebase with detached head Add recursive variant of Config.getNames() methods Prepare post 3.2.0-m3 builds JGit v3.2.0.201311130903-m3 Change-Id: Iad6e284e0fe2c7950f156372b334e47ebd82f3f7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Canonicalize worktree path in BaseRepositoryBuilder if set via configRobin Stocker2013-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | This is the case for submodules in .git/modules, which typically have a worktree config of "../../../dir". This can confuse callers, which e.g. try to call Repository.stripWorkDir with it. Bug: 423644 Change-Id: I0c00953f73f9316a66d0fc10eab52d8779c88f00 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Add missing @since tags for new public methods in ConfigMatthias Sohn2013-12-111-0/+2
| | | | | | | | Change-Id: I3b7937577c897a7e298ee431bd8c052cdb293dd9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Don't use API exception in RebaseTodoLineChristian Halstrick2013-12-113-43/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | This came up while testing the proposed buck build for jgit. With buck we can introduce smaller modules to allow for more concurrency during build and to better control inner structure of jgit. Trying to put the porcelain API into a different module than lower level implementation classes failed since RebaseTodoLine used a porcelain API exception causing a dependency cycle on the proposed modules. Using an exception defined on the same abstraction level fixes this problem. Change-Id: I26a5353e1a8fc23e67d8ce61309bd964f7665bcb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
| * Merge "Fix aborting rebase with detached head" into stable-3.2Robin Rosenberg2013-12-102-13/+81
| |\
| | * Fix aborting rebase with detached headStefan Lay2013-12-102-13/+81
| | | | | | | | | | | | | | | Bug: 423670 Change-Id: Ia6052867f85d4974c4f60ee5a6c820501e8d2427
| * | Add recursive variant of Config.getNames() methodsMatthias Sohn2013-12-063-2/+95
| |/ | | | | | | | | | | | | | | | | | | | | | | | | These methods allow to find all configuration entry names for a given section or section/subsection searching recursively through all base configurations of the given configuration. These methods are needed to calculate the names for the effective configuration of a git repository which combines the configuration entry names found in the repository, global and system configuration files Bug: 396659 Change-Id: Ie3731b5e877f8686aadad3f1a46b2e583ad3b7c6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Merge branch 'master' into stable-3.2Matthias Sohn2013-12-0589-1040/+2740
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Implement rebase.autostash CLI status should support --porcelain More helpful InvalidPathException messages (include reason) Fix IgnoreRule#isMatch returning wrong result due to missing reset Fix exception on conflicts with recursive merge Add pgm test for checkout of existing branch with checkout conflict Fix broken symbolic links on Cygwin. Do not allow non-ff-rebase if there are uncommitted changes Manage CheckoutConflictException in pgm Fix handling of file/folder conflicts during a checkout Mention null return in Javadoc of Config#getString Fix applying stash on other commit Use static factory methods instead of overloaded constructors Break up GCTest to run in parallel Modify T0004_PackReaderTest to use existing pack Move SampleDataRepositoryTestCase to org.eclipse.jgit.test Support running from JARs in JGitTestUtil Cache SimpleDateFormat in GitDateParser per locale Fix FIXUP error for blank lines in interactive rebase Fix parsing Rebase todo lines when commit message is missing Add close() method to API Update Jetty to 7.6.14.v20131031 Document that path parameters should use '/' as separator Improve Javadoc for typeHint parameter Do not update the ref hot bit when checking isIndexLoaded Don't delete .idx file if .pack file can't be deleted Change-Id: I02abfc09000d0fe9bdf4331c65bec7046f586179 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare post 3.2.0-m3 buildsMatthias Sohn2013-11-1351-56/+56
| | | | | | | | | | | | Change-Id: I6ef4aa758a6a5d465d4c460178ca3050b8a30449 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.2.0.201311130903-m3v3.2.0.201311130903-m3Matthias Sohn2013-11-1351-56/+56
| | | | | | | | | | | | | | | Change-Id: Icca089f4a60cc94123dc8bf61f7f76f501e08c4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | 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>