Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Investigating an issue with git hooks in egit version 6.5.0.202303070854-r
  • From: "Sohn, Matthias" <matthias.sohn@xxxxxxx>
  • Date: Sun, 9 Feb 2025 10:17:07 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sap.com; dmarc=pass action=none header.from=sap.com; dkim=pass header.d=sap.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=eQNUDH1SlHPoOWRGOUbeLo3b9MGL6RAyaV1GHBDE+z0=; b=I8QiyPN+AF/A+aJUle9RyL8ZcQ+wE38P/5qcLe8TmbcE9yy1n0bmUevZ/eldVGygjy5M17fdatnx4/6CL76P1ZtD7vObjzm5Ei0XJhG6CuKYU/hKF3y6V4+PEn5NE0gcM/4rBxIfvajNhj3eFymExHnu9HIGYkOQM7GhoiB7rRKgGWzB8KJkXAOoH939whzIJL3ioGjClbdeDXKUJ1g27Sj0RO9K0IbxcvYIiX8ulMt7U8uhIYoQ85tmWSIjOGW2Qz+JI6kn+7FXo8JSLucRjrHqlS2rsXKvI4gwrUNEn34XAXcg0DXkaKxm/BaevmsIJZqWI+taaKPyu7rBSMeBWQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aJZDiYtZImZCH8JQ2j+9Fvg/nGODW2A5COD/ID2umO6DuaweuR++o/ZBRBMg4RO6PrPpN9h+FXg+WxW2aVmBXnE/a6ancf2c6VBoqbZAmFhHFwJx/8j7zRtoqkJ0whT+PfwEPWTiycAVrG3M9KbaE4QNLZyMGX+dr+1sa77VC4LjY/YoFS2UzvakpGCEBubDpvH2YRnCFoASD8qTFH9pgZPQd0HGTFfpv0t8dyMHBI8oOfs26bOaFqCR9zxSIoXM1ntWHtLGViaFq9oG+vZqSnPtL0iGwP4qm9IzFKbtqevVzpXPkpLSvQlafnGMQuiKSVYKpbQHEglQx3ZlgFR4CQ==
  • 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: Adt5hN1guWAWdSVaTgCc9qwiBw05+gADsWoAAC3ky7AAI/DPSQ==
  • Thread-topic: [egit-dev] Investigating an issue with git hooks in egit version 6.5.0.202303070854-r

Ok, good to know 😊. I can’t check since I don’t have any Windows machine available.

If you can update Anypoint Studio to Eclipse 4.28 (2023-06) you can try to update

to EGit 7.1.0.202411261347-r.

 

 

From: egit-dev <egit-dev-bounces@xxxxxxxxxxx> on behalf of KARR, DAVID via egit-dev <egit-dev@xxxxxxxxxxx>
Date: Saturday, 8. February 2025 at 18:07
To: Matthias Sohn <matthias.sohn@xxxxxxxxx>, EGit developer discussion <egit-dev@xxxxxxxxxxx>
Cc: KARR, DAVID <dk068x@xxxxxxx>
Subject: Re: [egit-dev] Investigating an issue with git hooks in egit version 6.5.0.202303070854-r

(I would post after, but Outlook is being a pain.)

 

I don’t understand what you are saying. Perhaps there’s one point I made that is not completely clear. This hook is working perfectly fine in recent versions of Eclipse on Windows. That means it is working with JGit on Windows.  What is not working is doing the same thing in Anypoint studio on Windows, which uses that old version of Egit.

 

From: Matthias Sohn <matthias.sohn@xxxxxxxxx>
Sent: Friday, February 7, 2025 11:08 AM
To: EGit developer discussion <egit-dev@xxxxxxxxxxx>
Cc: KARR, DAVID <dk068x@xxxxxxx>
Subject: Re: [egit-dev] Investigating an issue with git hooks in egit version 6.5.0.202303070854-r

 

On Fri, Feb 7, 2025 at 6:41 PM KARR, DAVID via egit-dev <egit-dev@eclipse.org> wrote: I've been working on a local git hook to perform certain validations. It is working fine with the git command line and with recent versions of Eclipse.

On Fri, Feb 7, 2025 at 6:41PM KARR, DAVID via egit-dev <egit-dev@xxxxxxxxxxx> wrote:

I've been working on a local git hook to perform certain validations.  It is working fine with the git command line and with recent versions of Eclipse.  I'm working with a user who is using the Mulesoft Anypoint Studio on Windows, which uses older versions of the Eclipse platform.  This is using version 6.5.0.202303070854-r of eGit.

My git hook is set up with a tiny bash script in C:\Users\<userid>\.githooks\commit-msg .  That one-line script just executes the native application I constructed. The "hooksPath" property is set in the user's .gitconfig file.  The application also looks for debug properties in .gitconfig to write to a log file. Again, this is all working fine with git on the command line, including the log file.

When this user tries to create a commit from Anypoint Studio that is invalid according to the code in the git hook, it lets the commit proceed. Nothing appears in the log file for the hook. When he does this from the git command line, it properly blocks it.

We have verified in Preferences in Studio that it thinks the user's git configuration is in the location we expect, and it has all the properties we expect.

Is it possible that this old version of eGit (released almost two years ago) is doing something different to check the user's .gitconfig and executing hooks?

 

Running the hooks via FS.runHookIfPresent() in JGit is currently only implemented in FS_Posix

This means there is no implementation for Windows yet.

 

 

Contributions are welcome :-)

 

-Matthias


Back to the top