GIT Hooks [message #976490] |
Thu, 08 November 2012 11:15  |
Eclipse User |
|
|
|
So I'm investigating moving some of our version control to GIT and am having some trouble with the hooks. We maintain a database of currently open tasks and developers must commit changes against those. Consequently we currently have CVS hooks to verify that a commit is being made against a valid task.
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.
|
|
|
|
|
|
Re: GIT Hooks [message #979155 is a reply to message #977833] |
Sat, 10 November 2012 12:25   |
Eclipse User |
|
|
|
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
- 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,
[Updated on: Sun, 11 November 2012 10:41] by Moderator
|
|
|
|
Re: GIT Hooks [message #985802 is a reply to message #979155] |
Fri, 16 November 2012 03:47  |
Eclipse User |
|
|
|
R Shapiro wrote on Sat, 10 November 2012 12:25Getting 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,
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=391302
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=386908
[3] https://git.eclipse.org/r/#/c/8395/
[4] https://git.eclipse.org/r/#/c/8113/
|
|
|
Powered by
FUDForum. Page generated in 0.08173 seconds