[LU-16230] git Change-ID hook is not supported on RHEL8 Created: 10/Oct/22  Updated: 30/Nov/23

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: James A Simmons Assignee: Jian Yu
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The latest git commit-msg hook being used by whamcloud is using git-interpert-trailer which is not present on RedHAT systems. On our RHLE8 testbed I see:

".git/COMMIT_EDITMSG" 2934L, 83071C written
unknown option: --trailer
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
cannot insert change-id line in .git/COMMIT_EDITMSG


 Comments   
Comment by James A Simmons [ 10/Oct/22 ]

Also contrib/git-hooks/commit-msg produces an empty ChangeID.

Comment by Peter Jones [ 10/Oct/22 ]

Jian

Can you please advise on this one?

Thanks

Peter

Comment by Andreas Dilger [ 30/Nov/23 ]

James, I just stumbled across this ticket looking for something else. I have been using the Lustre commit hook on RHEL8 without issues. Are you using the latest one from contrib/git-hooks/commit-msg? Normally I set this up as a symlink so that it is always the latest for a particular branch:

# cd .git/hooks
# ln -sf ../../contrib/git-hooks/commit-msg
# ln -sf ../../contrib/git-hooks/prepare-commit-msg
Comment by James A Simmons [ 30/Nov/23 ]

The version of git we have installed is git version 1.8.3.1. Currently I use an old version of commit-msg that seems to work. Hm, this ticket is old so maybe that is not needed any more. I have to check.

Ah the system I'm using for push and pulls is a RHEL7 platform One of the  last at ORNL.

Comment by Andreas Dilger [ 30/Nov/23 ]

I'm using contrib/git-hooks/commit-msg without problems on my el7.9 system as well (same Git version). It doesn't use or mention "trailer" at all, so maybe you are using some other commit-msg hook?

Generated at Sat Feb 10 03:25:10 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.