Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Does EGit in Eclipse 2012-24 support global git hooks?
  • From: "KARR, DAVID" <dk068x@xxxxxxx>
  • Date: Fri, 10 Jan 2025 16:03:42 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=att.com; dmarc=pass action=none header.from=att.com; dkim=pass header.d=att.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ckSyFpCH/mnTbfH7/JFu0NShv0xwDjE8Qa4CULrbrG8=; b=Z217OAQ3cQ00l2TJSqvJmrrrzAbRScW6aNUGsW7Sf7FE6vHnGekJhu8Z0CDkrwdZJvoy7L0VQ9dUMRiQFxpEf9cT9jV2KGNnYjNfBA5xdnEDPpL38brBy56KzAtpj9JjsCEmWlHcEA7+5mPOut1IdTPY2PEJtB5CVOZ5BSQC6GMXb17mRg0oLRe/l2deQ3zxDUKXQlg4zYgoiVJxvEk+JW3Y/tkNw0s8H7nstuykzIWxe0697DPXnRed32gTp0oGoCchemH/vW6cN9HBPTPC3eqdLWgk0GC5xZutyM88qjGODRBkflRngbKgAu9U3vk0asC2YVcLxti00jLbVfFOww==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dfpqYLDGHTGZXrudNipgOGn6TVRFt6JSDaPpo61LY0IOcKTfQX6Bo6EC0RsV2XAXmdLBduRMNW+Zbd95OQFp/MUYlkCSWSF0iRRs0kk8jvDaR9ng884MIAJfpz7ga6d3z6zCsNRXocDGBewrh6LR0NeNyFXptgBcNMDEhYFC67ofwjH9HskLhHq8Y7q9ox61Cj09pfMtN3heCPF9MONbCgP+0tr5zm3Xvm1n67HB4I47e3WlxrxFUIQakpMffrjHUkyZLXLltdnpVhexs/n49uOmViQu6LYx0YFefFBZ+ZgCeh36/2b0jqJtP+F3FobbpDHJLHmfdUslPeGLrK9cSg==
  • Delivered-to: egit-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/egit-dev/>
  • List-help: <mailto:egit-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/egit-dev>, <mailto:egit-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/egit-dev>, <mailto:egit-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: Adti4i5mZZf225J9Qm22+ruUMW0sZgAlmNlw
  • Thread-topic: Does EGit in Eclipse 2012-24 support global git hooks?

In fact, I tried storing the same executable in the “.git/hooks” subdirectory of a git repository, and I staged a change in Eclipse in that repository with a comment that would fail validation, and it let me commit it. I made a similar change in the command line, and “git commit” showed that it executed the hook and blocked the commit. It doesn’t appear that egit is paying any attention to local git hooks.

 

From: egit-dev <egit-dev-bounces@xxxxxxxxxxx> On Behalf Of KARR, DAVID via egit-dev
Sent: Thursday, January 9, 2025 2:07 PM
To: EGit developer discussion <egit-dev@xxxxxxxxxxx>
Cc: KARR, DAVID <dk068x@xxxxxxx>
Subject: [egit-dev] Does EGit in Eclipse 2012-24 support global git hooks?

 

I've been working on a small native application that acts as a Git hook. It is working fine with git from the command line, but I discovered that it seems to have no effect in Eclipse. I am putting the executable in "%HOME\.githooks\commit-msg.exe"

ZjQcmQRYFpfptBannerEnd

I've been working on a small native application that acts as a Git hook.  It is working fine with git from the command line, but I discovered that it seems to have no effect in Eclipse.
 
I am putting the executable in "%HOME\.githooks\commit-msg.exe" in Windows, and setting the "core.hooksPath" property in "%HOME%\.gitconfig" to point to that directory.  Again, this is all working fine with git from the command line.  I can even see that property setting in the "User" tab in Team->Git in preferences.  However, when I test with a commit comment that the hook will fail validation on (it checks for a valid JIRA ticket in the comment), the commit in Eclipse goes through without being blocked.
 
I really hope I'm just doing something wrong, and it's not that EGit doesn't support hooks in global git config.
_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/egit-dev__;!!BhdT!mZ3PAlptYsKBemkt23nL6bRF4IezMrTgacUNYcrDGogWXePCA7gxJ5_FmAaM0r4tkjf6y82h8CQi-Boc$

Back to the top