Skip to content
Snippets Groups Projects
Select Git revision
  • todo
  • master default
  • maint
  • pu
  • next
  • v2.21.0
  • v2.21.0-rc2
  • v2.21.0-rc1
  • v2.21.0-rc0
  • v2.20.1
  • v2.20.0
  • v2.20.0-rc2
  • v2.20.0-rc1
  • v2.19.2
  • v2.20.0-rc0
  • v2.19.1
  • v2.18.1
  • v2.17.2
  • v2.16.5
  • v2.15.3
  • v2.14.5
  • v2.19.0
  • v2.19.0-rc2
  • v2.19.0-rc1
  • v2.19.0-rc0
25 results

hooks--prepare-commit-msg.sample

  • Kaartic Sivaraam's avatar
    9a203bcd
    hook: add sign-off using "interpret-trailers" · 9a203bcd
    Kaartic Sivaraam authored
    
    The sample hook to prepare the commit message before a commit allows
    users to opt-in to add the sign-off to the commit message.  The
    sign-off is added at a place that isn't consistent with the "-s"
    option of "git commit".  Further, it could go out of view in certain
    cases.
    
    Add the sign-off in a way similar to "-s" option of "git commit"
    using git's interpret-trailers command.
    
    "interpret-trailers" alone works well in all cases except when the
    user invokes "git commit" without any arguments.  In that case
    manually add a new line after the first line to ensure it's
    consistent with the output of "-s" option.
    
    Signed-off-by: default avatarKaartic Sivaraam <kaarticsivaraam91196@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9a203bcd
    History
    hook: add sign-off using "interpret-trailers"
    Kaartic Sivaraam authored
    
    The sample hook to prepare the commit message before a commit allows
    users to opt-in to add the sign-off to the commit message.  The
    sign-off is added at a place that isn't consistent with the "-s"
    option of "git commit".  Further, it could go out of view in certain
    cases.
    
    Add the sign-off in a way similar to "-s" option of "git commit"
    using git's interpret-trailers command.
    
    "interpret-trailers" alone works well in all cases except when the
    user invokes "git commit" without any arguments.  In that case
    manually add a new line after the first line to ensure it's
    consistent with the output of "-s" option.
    
    Signed-off-by: default avatarKaartic Sivaraam <kaarticsivaraam91196@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>