#
メッセージ自体の a で始まる行を必ずしも削除しないコミット メッセージのクリーンアップが必要です。デフォルトでは、文字で始まるすべての--cleanup=strip
行が削除されます。#
残念ながら、Tracエンジンの wiki フォーマッタは、コード ブロックの先頭でハッシュを使用して構文タイプを示します。これにより、コミット メッセージでエンジンの構文を使用する際に問題が発生します。
例:
Created demo of perl added to helloworld.pl
{{{
#!/usr/bin/perl
use strict;
# say hi to the user.
print "hello world\n";
}}}
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD^1 <file>..." to unstage)
#
# added: helloworld.pl
# and so on and so forth...
最終的にログに記録されたコミット メッセージで次の結果が得られるようにします。
commit 1234567890123456789012345678901234567890
Author: Danny <...>
Date: Wed Apr 7 13:34:29 2010 -0400
Created demo of perl added to helloworld.pl
{{{
#!/usr/bin/perl
use strict;
# say hi to the user.
print "hello world\n";
}}}
コミット メッセージの下部からハッシュで始まるすべての行を削除するカスタム フィルターを使用したいと思います。私が追加したメッセージの行をそのままにしておきます。gitでこれをどこで、またはどのように指定できますか?
操作を実行するための sed または perl スクリプトを作成することは問題ではないことに注意してください。問題は、それを gitにフックする場所を知ることだけです。
私の質問の混乱についてお詫び申し上げます。私はそれがどれほど曖昧であるかに気づきませんでした。