Re: Template for commit messages

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Template for commit messages
Дата
Msg-id 20160129003319.GA746802@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Template for commit messages  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Stephen Frost wrote:

> > OK, but keep in mind whatever script committers user should remove tags
> > that are empty after exiting the editor.  I can provide the grep regex
> > in git somewhere too:
> > 
> >   egrep -v "^(Author|Reported-by|Bug|Reviewed-by|Tested-by|Backpatch-through): *$"
> 
> If the template is there then, for my part at least, I wouldn't mind
> killing the empty lines.  Having a decent script would work too, of
> course... but I have to admit that I've not tried having a script modify
> my commit messages right before they're committed and, well, it'd take a
> bit for me to be comfortable with it.
> 
> No one wants garbled commit messages from a script that went awry. ;)

Maybe it'd be better to have the lines start with a # , because then
git commit itself removes those as comments.  So the committer would
need to remove the # and then fill in the data for the field.

git-commit(1) says:
      -t <file>, --template=<file>          When editing the commit message, start the editor with the contents
in the given file. The commit.template configuration variable is          often used to give this option implicitly to
thecommand. This          mechanism can be used by projects that want to guide participants          with some hints on
whatto write in the message in what order. If          the user exits the editor without editing the message, the
commit         is aborted. This has no effect when a message is given by other          means, e.g. with the -m or -F
options.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Template for commit messages
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [PROPOSAL] VACUUM Progress Checker.