Re: [PATCH 0/3] "commit --template" fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Monsen <haircut@xxxxxxxxx> writes:

> How about this? I'm a little bummed it doesn't include why commit
> --template exists at all, but it reads well: terse and to the point like
> (IMHO) a manpage should.

Perhaps we should explain why somebody might want to use --template
instead of -F; personally, I do not think --template command line option
would not make much sense unless it is used as a part of a script that
enforces external constraints in a larger workflow, even though such a
project could instead require the participants to set commit.template to
one supplied by the project.  As an enforcement mechanism, use of such
stricter "commit wrapper" and commit.template configuration cannot be
mechanical and absolute either way, as Git is distributed and whatever
happens in the participant's repository is purely up to the participant.

>  -t <file>::
>  --template=<file>::
> +	Use the contents of the given file as the commit message. The
> +	editor is invoked so you can make subsequent changes. If you make no
> +	changes, the commit is aborted. If a message is specified using
>  	the `-m` or `-F` options, this option has no effect. This
>  	overrides the `commit.template` configuration variable.

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 the command.  This mechanism can be used by
projects that want to guide participants with some hints on what to 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.

Hmm?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]