Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsGIT Hooks
https://www.eclipse.org/forums/index.php/mv/msg/431852/976490/#msg_976490
I have a GIT repo and have tried adding some hooks into it, commit-msg hook on the local machine and a post-receive hook on the main server but am having trouble getting these to execute. In fact the only way I can get the local hook to execute is by committing a change via the command line, without changing anything but committing through eclipse the hook does not get executed.
After some googling I've found a couple of posts particularly stackoverflow.com/questions/6232026/egit-hooks-do-not-get-triggered which suggests that using EGit I won't get any hooks executed. This post is fairly old but I can't see anything official so I'm not sure whether there is a problem with my setup or if hooks really don't get executed?
If they don't - how come? What is EGit doing that stops GIT from executing the hook as per usual?
Thanks for your help!
Dan.]]>Dan Hargreaves2012-11-08T16:15:18-00:00Re: GIT Hooks
https://www.eclipse.org/forums/index.php/mv/msg/431852/976673/#msg_976673
> After some googling I've found a couple of posts particularly stackoverflow.com/questions/6232026/egit-hooks-do-not-get-triggered which suggests that using EGit I won't get
> any hooks executed. This post is fairly old but I can't see anything official so I'm not sure whether there is a problem with my setup or if hooks really don't get
executed?
>
> If they don't - how come? What is EGit doing that stops GIT from executing the hook as per usual?
It's mostly a matter of priorities. There are so many other things to do first. As always, patches welcome.
Consider that we do not require, and will not require, Git to be installed so hook execution would be optional.
-- robin]]>Robin Rosenberg2012-11-08T19:11:06-00:00Re: GIT Hooks
https://www.eclipse.org/forums/index.php/mv/msg/431852/977386/#msg_977386
Thanks.]]>Dan Hargreaves2012-11-09T08:42:07-00:00Re: GIT Hooks
https://www.eclipse.org/forums/index.php/mv/msg/431852/977833/#msg_977833
> Ok, thanks. Its maybe something that I've overlooked then - I assumed
> EGit simply wrapped around GIT providing a java library rather than
> resorting to the command line - but if it doesn't require GIT to be
> installed is it then actually a reimplementation of GIT in java?
JGit is a reimplementation of Git in pure Java (and under a license more
compatible with Eclipse): http://eclipse.org/jgit/
EGit is the integration of JGit in the Eclipse UI and Team APIs: http://eclipse.org/egit/]]>Pierre-Charles David2012-11-09T16:08:01-00:00Re: GIT Hooks
https://www.eclipse.org/forums/index.php/mv/msg/431852/979155/#msg_979155
There are a number of other missing features. Here's a list of the ones I've run into:
Commonly used operations that are not supported:
- svn
- bundle
- prune [maybe this works as part of the new 'Collect Garbage' operation]
- checkout <commit> -- <directory>
- reset <commit> -- <path>
except for the special case of resetting a single file to the HEAD revision
which can be done by unstaging workspace changes to that file.
Commonly used features that are not supported:
- Pulling from a bundle
- Hooks
- Creation of light-weight and signed tags
- Most merge options, including -s, -ff, -no-ff, -ff-only. One that is supported as of 2.1 is '--squash'.
- Merge strategies other than'resolve'. Since the
default strategy in command-line Git is 'recursive'in the
most common cases (pulling, or merging one branch) you might
get different behavior from an egit merge or pull.
- Most rebase options other than --skip, --continue and --abort.
- A number of configuration settings, including most of the
ones related to merging,
]]>R Shapiro2012-11-10T17:25:55-00:00Re: GIT Hooks
https://www.eclipse.org/forums/index.php/mv/msg/431852/982207/#msg_982207
> Ok, thanks. Its maybe something that I've overlooked then - I assumed EGit simply wrapped around GIT providing a java library rather than resorting to the command line -
> but if it doesn't require GIT to be installed is it then actually a reimplementation of GIT in java?
Indeed it it.
-- robin]]>Robin Rosenberg2012-11-13T01:35:33-00:00Re: GIT Hooks
https://www.eclipse.org/forums/index.php/mv/msg/431852/985802/#msg_985802
R Shapiro wrote on Sat, 10 November 2012 12:25
Getting back to the original question, JGIt is not a complete implementation of Git. One of the features it does not yet support is hooks, at least as far as I know.
There are a number of other missing features. Here's a list of the ones I've run into:
Commonly used operations that are not supported:
- svn
- bundle
- prune [maybe this works as part of the new 'Collect Garbage' operation]
- checkout <commit> -- <directory>
- reset <commit> -- <path>
except for the special case of resetting a single file to the HEAD revision
which can be done by unstaging workspace changes to that file.
Commonly used features that are not supported:
- Pulling from a bundle
- Hooks
- Creation of light-weight and signed tags
Use of Bouncycastle was approved in the meantime, we are still struggling to get this into Orbit [1], as soon as this is available I can continue my work on [2].
Quote:
- Most merge options, including -s, -ff, -no-ff, -ff-only. One that is supported as of 2.1 is '--squash'.
Tomasz is working on --no-ff [3]
Quote:
- Merge strategies other than'resolve'. Since the
default strategy in command-line Git is 'recursive'in the
most common cases (pulling, or merging one branch) you might
get different behavior from an egit merge or pull.
George is working on an implementation for recursive merge [4]
Quote:
- Most rebase options other than --skip, --continue and --abort.
- A number of configuration settings, including most of the
ones related to merging,