aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* TestRepository: Use try-with-resources where appropriateDave Borowitz2015-03-111-74/+58
| | | | Change-Id: I06f9534ab84278df37a140700fc2bed5ab667299
* Merge "ArchiveCommand: Allow to pass options to underlying stream"Shawn Pearce2015-03-119-17/+232
|\
| * ArchiveCommand: Allow to pass options to underlying streamDavid Ostrovsky2015-02-209-17/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current ArchiveCommand design doesn't allow to pass in options to underlying stream implementations. To overcome this, client has to implement custom format implementation (it cannot be derived from the existing one, because the classes are marked as final), and set the options using ThreadLocal, before the method ArchiveOutputStream createArchiveOutputStream(OutputStream s) is get called. This change extends the ArchiveCommand.Format by allowing to pass option map during creation of ArchiveOutputStream. ArchiveCommand is extended correspondingly. That way client can easily pass options to the underlying streams: Map<String, Object> level = ImmutableMap.<String, Object> of( "level", new Integer(9)); new ArchiveCommand(repo) .setFormat("zip") .setFormatOptions(level) .setTree(tree) .setPaths(paths) .setPrefix(prefix) .setOutputStream(sidebandOut) .call(); Change-Id: I1d92a1e5249117487da39d19c7593e4b812ad97a Signed-off-by: David Ostrovsky <david@ostrovsky.org>
* | Merge changes I627681be,I334034a2Shawn Pearce2015-03-101-8/+17
|\ \ | | | | | | | | | | | | | | | * changes: TreeWalk: Do not close reader passed explicitly to constructor TreeWalk: Stop using deprecated ObjectReader#release()
| * | TreeWalk: Do not close reader passed explicitly to constructorDave Borowitz2015-03-101-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | The TreeWalk(ObjectReader) constructor is explicitly to handle the case where the caller is responsible for opening and closing the reader. The reader should only be closed when it was created in the TreeWalk(Repository) constructor. Change-Id: I627681be80d69ea549f953255a64c7b3b68bcec9
| * | TreeWalk: Stop using deprecated ObjectReader#release()Dave Borowitz2015-03-101-4/+1
| | | | | | | | | | | | Change-Id: I334034a2991a07664302bc8d1f3dead85c2caffe
* | | Make s3 domain dynamic to support different s3 regionsMatthew Spurrier2015-03-101-4/+10
|/ / | | | | | | | | Change-Id: If8f9e85368c56d88bb6ae9efe1b3a29cc18cc1d5 Signed-off-by: Matthew Spurrier <matthew@spurrier.com.au>
* | RevWalk: Do not close reader passed explicitly to constructorDave Borowitz2015-03-101-7/+18
| | | | | | | | | | | | | | | | | | The RevWalk(ObjectReader) constructor is explicitly to handle the case where the caller is responsible for opening and closing the reader. The reader should only be closed when it was created in the RevWalk(Repository) constructor. Change-Id: Ic0d595dc8d10de79e87549546c6c5ea2dc617e9b
* | RevWalk: Stop using deprecated ObjectReader#release()Dave Borowitz2015-03-101-2/+2
| | | | | | | | Change-Id: If4d34f18352bd17467aeded6fd3478f29244657b
* | Update all standard maven plugins to latest versionsDave Borowitz2015-03-101-9/+9
| | | | | | | | | | | | | | | | The latest versions of the javadoc and source plugins in particular avoid some pathological slowness I'd been seeing on Linux with Java 7 or later. Change-Id: I9fddd7e6ef513debec5f014ed2efc4fea6917d1f
* | Merge "Add "--long" option to JGit describe"Christian Halstrick2015-03-105-6/+81
|\ \
| * | Add "--long" option to JGit describeChristian Halstrick2015-03-095-6/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Native git supports "git describe --long". This will enforce returning a long description of a commit even if a tag is directly pointing to the commit (in contrast to just returning the tag name as it is now). This commit teaches JGits DescribeCommand and the describe command in the pgm package to support "--long". Bug: 460991 Change-Id: I65e179b79e89049c6deced3c71cb3ebb08ed0a8f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Remove AutoCloseable from internal PackFile and friendsShawn Pearce2015-03-094-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PackFile is held by the block cache and cannot be auto closed in a try-with-resources statement. Remove the interface as JGit does explicit management of the instances. ObjectDatabase and RefDatabase are internal details of Repository and are managed with the Repository. Marking them AutoCloseable provides no value to the library or an application using the API. Change-Id: Ibee19eadd66233e6666b601583daa1834a7778f1
* | | PushCertificateParser: Fix check for blank line after headerShawn Pearce2015-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reference equality (!= or ==) cannot be used to check for String equality. String objects are not necessarily interned to the same instance. Use .isEmpty() since the function only cares about an empty string and does not need to test a specific string value. Change-Id: If530cb59666a8196d57d2348c893706a517ea541
* | | Cleanup some push certificate related javadocShawn Pearce2015-03-092-45/+22
| | | | | | | | | | | | Change-Id: I319ee4e99462598bf6a934b1efc7939bc4b057a5
* | | Fix an invalid format stringDavid Pletcher2015-03-091-3/+12
|/ / | | | | | | | | | | | | | | The %x format specifier is not valid for a byte array. This patch fixes a bug that would cause an IllegalFormatConversionException. Change-Id: I025975eca7b2f10bbafa39f5519f8668e6536541 Signed-off-by: David Pletcher <dpletcher@google.com>
* | Merge "Support for the commit-msg hook."Matthias Sohn2015-03-026-0/+262
|\ \
| * | Support for the commit-msg hook.Laurent Delaigue2015-03-026-0/+262
| | | | | | | | | | | | | | | | | | | | | | | | This hook uses the file .git/COMMIT_EDITMSG to receive and potentially modify the commit message. Change-Id: Ibe2faadfb5d3932a5a3da2252d8156c4c04856c7 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge "Allow public access to PackIndex"Shawn Pearce2015-03-021-1/+11
|\ \ \ | |/ / |/| |
| * | Allow public access to PackIndexDavid Pletcher2015-03-021-1/+11
| | | | | | | | | | | | | | | | | | | | | The index provides access to a list of objects in a pack. This will be helpful for repository integrity checking. Change-Id: I435eeeb3fe1b1f5632d40528936416e97491d412 Signed-off-by: David Pletcher <dpletcher@google.com>
* | | Refactored pre-commit hook to make it less invasive.Laurent Delaigue2015-03-0217-238/+435
|/ / | | | | | | | | | | | | | | | | Hooks are now obtained via a convenient API like git commands, and callers don't have to check for their existence. The pre-commit hook has been updated accordingly. Change-Id: I3383ffb10e2f3b588d7367b9139b606ec7f62758 Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Add an in-process pack transport for use in testsDave Borowitz2015-02-275-0/+445
| | | | | | | | | | | | | | | | This allows for testing arbitrary sets of push/fetch hooks (e.g. PreReceiveHook) without depending on either an external protocol (e.g. HTTP) or the local filesystem. Change-Id: I4ba2fff9c8a484f990dea05e14b0772deddb7411
* | Extract classes for transport within a JGit processDave Borowitz2015-02-273-174/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | TransportLocal knows how to spin up a thread to allow two repositories in the same process to communicate using the wire protocol. However, it is still tied to local on-disk filesystems, and needs to be able to fork processes if not using the default git-{upload,receive}-pack implementation. Extract out the connection classes so they can be used by other transport implementations. Change-Id: I5db59086740735508c2e70a597c2d1a89014b072
* | Add missing since tags for new APIMatthias Sohn2015-02-272-0/+4
| | | | | | | | Change-Id: I90d4d7566b2e220b8ea8ea1c644fe4b7fa81c0a3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-3.7'Matthias Sohn2015-02-2711-23/+52
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Prepare 3.7.1-SNAPSHOT builds JGit v3.7.0.201502260915-r Read user.name and email from environment first Provide more details in exceptions thrown when packfile is invalid Change-Id: I427f861c6bc94da5e3e05dbbebbf0ad15719a323 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Prepare 3.7.1-SNAPSHOT buildsMatthias Sohn2015-02-2755-269/+269
| | | | | | | | | | | | | | | Change-Id: I2e97610ea9e552e5800e7ca895fd193c8bc507aa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v3.7.0.201502260915-rv3.7.0.201502260915-rMatthias Sohn2015-02-2655-59/+59
| | | | | | | | | | | | | | | Change-Id: Iec17746cad81cfb1d775e782b30f9d8a13c938b6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Merge "Read user.name and email from environment first" into stable-3.7Christian Halstrick2015-02-252-8/+26
| |\ \
| | * | Read user.name and email from environment firstMatthias Sohn2015-02-242-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to [1] user name and email are taken first from the environment variables: GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL In case (some of) these environment variables are not set, the information is taken from the git configuration. JGit doesn not yet support the environment variables GIT_AUTHOR_DATE and GIT_COMMITTER_DATE. [1] https://www.kernel.org/pub/software/scm/git/docs/git-commit-tree.html#_commit_information Bug: 460586 Change-Id: I3ba582b4ae13674cf319652b5b13ebcbb96dd8ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Provide more details in exceptions thrown when packfile is invalidMatthias Sohn2015-02-178-14/+25
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Mention packfile path in exceptions thrown when we detect that a packfile is invalid and make excplicit that corrupt packs are removed from the pack list. Change-Id: I454ada5f8e69307d3f34d1c1b8f3cb87607ddf35 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Add/fix since tags for new API for push certificatesMatthias Sohn2015-02-253-3/+6
| | | | | | | | | | | | | | | | | | This was missed in change I249869cadb2d55aef016371b9311b8583591b9cf Change-Id: I19c9d4c04b6aa92b9e04c192dee70775d6985b58 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Merge branch 'stable-3.7'Matthias Sohn2015-02-2415-85/+249
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Add log4j and slf4j-log4j bridge to jgit feature Use slf4j to log instead of printing to System.err Use Target Platform Definition DSL to generate target platforms Change-Id: Ic8779868150c910fa55fd20348e35723e6add0f1
| * | Add log4j and slf4j-log4j bridge to jgit featureMatthias Sohn2015-02-177-3/+42
| | | | | | | | | | | | | | | | | | | | | CQ: 9207 CQ: 9241 Change-Id: Ic06a06da0a74f8fa494c0753cbe9ed2356c21ab3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Use slf4j to log instead of printing to System.errMatthias Sohn2015-02-1711-30/+62
| | | | | | | | | | | | | | | | | | | | | CQ: 9206 Bug: 458445 Change-Id: Ic68fb7dbe0fb46bf30f157db45bf18d8f3a704c0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Use Target Platform Definition DSL to generate target platformsMatthias Sohn2015-02-179-58/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "Target Platform Definition DSL and Generator" [1] heavily simplifies maintenance of target platforms. It allows to modularize target platform definitions which eliminates code duplication. The .target files understood by P2 and Tycho are generated from .tpd files which are written in the target platform definition DSL. In order to edit .tpd files and generate .target files install the "Target Platform Definition DSL and Generator" 2.0 or later [2] (Note: on Kepler you also need to add [3] to get Xtext 2.5 which is not available by default on Kepler). This tools is needed only if you need to change the Target Platform definition files (*.targetplatform and *.tpd) and re-generate the *.target files. In normal development you do not need this and can simply use the generated *.target themselves. In addition - update Orbit repository for 4.5 to Mars M5 - use latest released Orbit p2 repository for platform version Luna and earlier [1] https://github.com/mbarbero/fr.obeo.releng.targetplatform [2] http://mbarbero.github.io/fr.obeo.releng.targetplatform/p2/latest/ [3] http://download.eclipse.org/modeling/tmf/xtext/updates/releases/ Change-Id: Ia701972785c3e88aba66a7f15a2b3cf638727eea Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | Port push certificatesStefan Beller2015-02-238-0/+620
| |/ |/| | | | | | | | | | | | | | | | | | | | | Push certificates ("git push --signed") have been part of git-core since version 2.2.0 (released Nov 26 2014). We also want to support that feature. This is not complete and is lacking the actual functionality to validate the signature for now. Change-Id: I249869cadb2d55aef016371b9311b8583591b9cf Signed-off-by: Stefan Beller <sbeller@google.com>
* | Move console classes to pgm bundleMatthias Sohn2015-02-1033-1208/+44
| | | | | | | | | | | | | | | | | | Since we updated minimum Java version to Java 7 the console bundle doesn't need to be a separate bundle anymore. Move the contained classes to the pgm bundle which is using these classes. Change-Id: If8e6f2d7405fdfe6f4b178673b4ccf99c67d4b64 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Implement AutoClosable interface on classes that used release()Matthias Sohn2015-02-098-22/+131
| | | | | | | | | | | | | | | | | | Implement AutoClosable and deprecate the old release() method to give JGit consumers some time to adapt. Bug: 428039 Change-Id: Id664a91dc5a8cf2ac401e7d87ce2e3b89e221458 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Implement AutoClosable interface to support try-with-resources blockMatthias Sohn2015-02-096-6/+7
| | | | | | | | | | | | Bug: 428039 Change-Id: I41880862db5303b5bea4b2184ba7844d69c997b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Set minimum required Java version to Java 7Matthias Sohn2015-02-0949-119/+81
| | | | | | | | | | | | Bug: 458475 Change-Id: Iea8f2236d4e6a94a8d14bb8cc685006ea3fd1bb7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-3.7'Matthias Sohn2015-02-0422-11/+1117
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-3.7: Add option --orphan for checkout Prepare post 3.7.0.201502031740-rc1 builds JGit v3.7.0.201502031740-rc1 Support for the pre-commit hook Fix FileUtils.testRelativize_mixedCase which failed on Mac OS X Add a hook test Introduce hook support into the FS implementations If a pack isn't found on disk remove it from pack list Conflicts: org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF Change-Id: I936acd24d47b911fa30ab29856094e1b2c6ac3db Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Add option --orphan for checkoutRĂ¼diger Herrmann2015-02-043-3/+19
| | | | | | | | | | Change-Id: I546a93f3e147d8d6fc70094b22679c0d11cd8921 Signed-off-by: RĂ¼diger Herrmann <ruediger.herrmann@gmx.de>
| * Prepare post 3.7.0.201502031740-rc1 buildsMatthias Sohn2015-02-0455-59/+59
| | | | | | | | Change-Id: Id3728e771a4441757de016cc9d68055f668126b0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v3.7.0.201502031740-rc1v3.7.0.201502031740-rc1Matthias Sohn2015-02-0355-59/+59
| | | | | | | | | | Change-Id: Ia2ea65945b7e1d4120da3d6e6c9f6d5fdb642ae6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Support for the pre-commit hookLaurent Goubet2015-02-028-8/+169
| | | | | | | | | | | | | | | | | | Introduce support for the pre-commit hook into JGit, along with the --no-verify commit command option to bypass it when rebasing / cherry-picking. Change-Id: If86df98577fa56c5c03d783579c895a38bee9d18 Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Fix FileUtils.testRelativize_mixedCase which failed on Mac OS XMatthias Sohn2015-02-021-19/+8
| | | | | | | | | | | | | | HFS is case insensitive hence expecting it to return the result for case sensitive filesystem doesn't work. Change-Id: I292eab78e50711529a0412f9a54e174a3ac16109 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Add a hook testMatthias Sohn2015-02-021-0/+106
| | | | | | | | Change-Id: I8059ef299aeb43373f4f45274030886171a20a8e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Introduce hook support into the FS implementationsLaurent Goubet2015-02-0212-0/+829
| | | | | | | | | | | | | | | | | | | | | | This introduces the background plumbing necessary to run git hooks from JGit. This implementation will be OS-dependent as it aims to be compatible with existing hooks, mostly written in Shell. It is compatible with unix systems and windows as long as an Unix emulator such as Cygwin is in its PATH. Change-Id: I1f82a5205138fd8032614dd5b52aef14e02238ed Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * If a pack isn't found on disk remove it from pack listMatthias Sohn2015-01-273-0/+5
| | | | | | | | | | | | | | | | | | If accessing a pack throws FileNotFoundException the pack was deleted and we need to remove it from the pack list. This can be caused e.g. by git gc. Change-Id: I5d10f87f364dadbbdbfb61b6b2cbdee9c7457f3d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Add BatchRefUpdate#toString()Dave Borowitz2015-01-271-0/+16
| | | | | | | | Change-Id: I58c342a91911763055c1073d2f426340fbf94fa4