threads / discuss / 31980

Why does git-commit --template want the template to be modified ?

Subject: Why does git-commit --template want the template to be modified ?

## tl;dr

4 messages between Oct 30, 2012 and Oct 30, 2012.

replies: 3people: 3as markdown or json

Francis Moreau· Oct 30, 2012, 10:53 UTC · lore
Hi,

I'm using git-commit with the --template option. The template I'm given is self sufficient for my purpose but as stated in the documentation, git-commit wants the template to be edited otherwise it aborts the operation.

Is it possible to change this ?
Thanks
-- 
Francis
Tomas Carnecky· Oct 30, 2012, 11:09 UTC · re: Francis Moreau · lore

Re: Why does git-commit --template want the template to be modified ?

On Tue, 30 Oct 2012 11:53:08 +0100, Francis Moreau <francis.moro@gmail.com> wrote:
Show 8 quoted lines
> Hi,
> 
> I'm using git-commit with the --template option. The template I'm
> given is self sufficient for my purpose but as stated in the
> documentation, git-commit wants the template to be edited otherwise it
> aborts the operation.
> 
> Is it possible to change this ?
It seems you want -F instead of --template.
Francis Moreau· Oct 30, 2012, 14:23 UTC · re: Tomas Carnecky · lore

Re: Why does git-commit --template want the template to be modified ?

Hi,

On Tue, Oct 30, 2012 at 12:09 PM, Tomas Carnecky <tomas.carnecky@gmail.com> wrote:

Show 11 quoted lines
> On Tue, 30 Oct 2012 11:53:08 +0100, Francis Moreau <francis.moro@gmail.com> wrote:
>> Hi,
>>
>> I'm using git-commit with the --template option. The template I'm
>> given is self sufficient for my purpose but as stated in the
>> documentation, git-commit wants the template to be edited otherwise it
>> aborts the operation.
>>
>> Is it possible to change this ?
>
> It seems you want -F instead of --template.

Yes, but I want git to still parse the log and sanitize it (remove trailing whitespaces, comments ...)

I actually found that "-F --edit" is what I needed.
Thanks both for your answer.
-- 
Francis
Johannes Sixt· Oct 30, 2012, 11:14 UTC · re: Francis Moreau · lore

Re: Why does git-commit --template want the template to be modified ?

Am 10/30/2012 11:53, schrieb Francis Moreau:
Show 6 quoted lines
> I'm using git-commit with the --template option. The template I'm
> given is self sufficient for my purpose but as stated in the
> documentation, git-commit wants the template to be edited otherwise it
> aborts the operation.
> 
> Is it possible to change this ?
Perhaps you wanted to use --file instead of --template?
-- Hannes

← back to recent threads