Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » git hook pre-push(egit does not trigger the pre-push hook)
git hook pre-push [message #1733015] Mon, 23 May 2016 17:20 Go to next message
sultan sultan is currently offline sultan sultanFriend
Messages: 1
Registered: May 2016
Junior Member
Hi All,

I've a question related to git hook pre-push.
I tried to trigger git hook pre-push from the eclipse, but its not triggered.
is it supposed to be working on eclipse mars ?
Version: Mars Release (4.5.0)
Build id: 20150621-1200
And I've updated the egit version to 4.3.1.201605051710-r
and I'm working from mac os x el capitan 10.11
Re: git hook pre-push [message #1733036 is a reply to message #1733015] Mon, 23 May 2016 15:36 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
In 4.3.1 the pre-push hook should be called on unix platforms and cygwin, though the commands the pre-push hook calls need to be available on the path seen by JGit/EGit.

Try the following:
- open a terminal,
- ensure that commands called by pre-push are reachable from the PATH in this terminal
- start Eclipse from the terminal
- try if the pre-push hook is invoked.
Re: git hook pre-push [message #1755529 is a reply to message #1733036] Sun, 05 March 2017 03:22 Go to previous messageGo to next message
David Vree is currently offline David VreeFriend
Messages: 48
Registered: July 2010
Member
I don't have Cygwin, but instead have Git for Windows. The hooks are invoked from Git Bash, but not from Eclipse.

Should this work? Any suggestions?
Re: git hook pre-push [message #1755981 is a reply to message #1755529] Thu, 09 March 2017 19:09 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
That's not implemented yet.

Someone using Windows needs to implement FS.runHookIfPresent()
http://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java#n796
for Windows in
http://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java

Maybe you want to contribute that ?
Re: git hook pre-push [message #1755992 is a reply to message #1755981] Thu, 09 March 2017 20:00 Go to previous message
David Vree is currently offline David VreeFriend
Messages: 48
Registered: July 2010
Member
I see. Thanks for the response. I'm afraid that is beyond my ability....
Previous Topic:Very slow git clone performance
Next Topic:Advanced history filter
Goto Forum:
  


Current Time: Tue Apr 16 21:19:14 GMT 2024

Powered by FUDForum. Page generated in 2.19289 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top