aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/hooks/Hooks.java
Commit message (Collapse)AuthorAgeFilesLines
* Update EDL 1.0 license headers to new short SPDX compliant formatMatthias Sohn2020-01-041-38/+5
| | | | | | | | | | This is the format given by the Eclipse legal doc generator [1]. [1] https://www.eclipse.org/projects/tools/documentation.php?id=technology.jgit Bug: 548298 Change-Id: I8d8cabc998ba1b083e3f0906a8d558d391ffb6c4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add ability to redirect stderr from git hooksTim Neumann2019-12-091-4/+91
| | | | | | | | | | | | | This will change the behavior in the CLI to resemble that of C-Git more closely by printing the stderr of the hooks to the CLI stderr independently of the exit code of the hook. This is also useful for the corresponding EGIT-Change, which will add the ability to show the hook output in eclipse. With this also the stderr can be shown even if the exit code is 0. Bug: 553471 Change-Id: Ie7bc503fe39e270e9b93dd1108b5879f02a12b4c Signed-off-by: Tim Neumann <Tim.Neumann@advantest.com>
* Don't throw if a pre-push hook is ignored.Markus Duft2018-04-101-1/+5
| | | | | | | This breaks any scenario where native git (with LFS) clones a repository (and thus installs the hook) and later on JGit is used to push changes. Change-Id: I2a17753377265a0b612ba3451b9df63a577a1c38 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* LFS: support merge/rebase/cherry-pick/diff/compare with LFS filesMarkus Duft2018-03-031-24/+10
| | | | | | | | | | | | Respect merge=lfs and diff=lfs attributes where required to replace (in memory) the content of LFS pointers with the actual blob content from the LFS storage (and vice versa when staging/merging). Does not implement general support for merge/diff attributes for any other use case apart from LFS. Change-Id: Ibad8875de1e0bee8fe3a1dffb1add93111534cae Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* LFS: pre-push upload supportMarkus Duft2018-02-271-0/+28
| | | | | | | | | | | | If JGit built in LFS support is enabled for the current repository (or user/system), any existing pre-push hook will cause an exception for the time beeing, as only a single pre-push hook is supported. Thus either native pre-push hooks OR JGit built-in LFS support may be enabled currently, but not both. Change-Id: Ie7d2b90e26e948d9cca3d05a7a19489488c75895 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit hooks packageMatthias Sohn2017-12-181-0/+12
| | | | Change-Id: I3b644048eb0fc19f94ba8f9799b5a2310481103f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add support for post-commit hooksMartin Goellnitz2016-09-131-0/+12
| | | | | Change-Id: I6691b454404dd4db3c690ecfc7515de765bc2ef7 Signed-off-by: Martin Goellnitz <m.goellnitz@outlook.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add support for pre-push hooksChristian Halstrick2015-11-021-0/+11
| | | | | | | | | When the file <git-dir>/hooks/pre-push exists make sure that is is executing during a push. The pre-push hook runs during git push, after the remote refs have been updated but before any objects have been transferred. Change-Id: Ibbb58ee3227742d1a2f913134ce11e7a135c7f4c
* Support for the commit-msg hook.Laurent Delaigue2015-03-021-0/+11
| | | | | | | | 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>
* Refactored pre-commit hook to make it less invasive.Laurent Delaigue2015-03-021-0/+66
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>